Has anyone implemented a mechanism to automatically size the edit window according to the resolution of the screen being used? I imagine that this would require the use of
JavaScript, hence raising the
RequiredEnvironmentForTWiki. (Actually
JavaScript is no problem for my organisation).
Thanks. M.
--
MartinCleaver - 03 Apr 2001
I have heared that IE supports percent values for TEXTAREA tags, but I have not tried it out. That would be a browser specific solution. A problem with that is when you have
TWikiCategoryTables of different size in each web.
--
PeterThoeny - 03 Apr 2001
I have no solution for a resizable edit window, but I've made a
small workaro
und to enable the horizontal scrollbar in the edit window. This is done by a new parameter
?wrap=off
behind the edit URL.
Sometimes it is better to have a long line without the wraparound, eg. for editing tables.
--
StefanScherer - 04 Apr 2001
I found the following that looks like it would solve the problem.
http://www.chat.net/~jeske/Projects/Javascript/
Perhaps someone could test this works on Netscape?
--
MartinCleaver - 31 Oct 2001
Found another:
http://javascript.internet.com/forms/resize-form-elements.html
Looks simple enough and that would work on NS.
--
MartinCleaver - 31 Oct 2001
Use
CSS to set the width. Works on Netscape 6, Mozilla and IE.
textarea {
width: 100%;
}
--
AdrianLynch - 07 Nov 2001
Adrian: Would that work on IE 5.0?
Core team: What's the minimum versions of the browsers required for TWiki?
--
MartinCleaver - 07 Nov 2001
According to indexdotcss it is supported in IE5 up.
http://www.eskimo.com/~bloo/indexdot/css/properties/dimension/width.htm
--
AdrianLynch - 07 Nov 2001
Cool. Would you like to have a bash at altering the edit template to see whether it works?
I, for one would much appreciate it.
--
MartinCleaver - 07 Nov 2001
OK, I am easily able to change it on my system here, but how would I send you the changes? I am a complete newbie when it comes to that side of it.
- The questions I have though are: is there any CSS support intended for the system as a whole (ie will their be a central CSS file).
- And should this not be part of a users preferences?
As a test I set my EDITBOXWIDTH to 75" STYLE="width: 100% and it worked!
I will explore the latter idea and look into modifying a users preferences...
--
AdrianLynch - 08 Nov 2001
OK I have added a new variable for user preferences, EDITBOXCSS, and modified the edit.tmpl file. You can add whatever
CSS tags you want...
How do I send you the changes or share this with others... I am not even sure if I have gone about it in the right way!
--
AdrianLynch - 08 Nov 2001
Sounds great. Just attach it to this page and alter the
TopicClassification to
FeatureHack.
Thanks.
--
MartinCleaver - 08 Nov 2001
With the patch below you can now add to the user prefs page:
* set EDITBOXCSS = width: 100%
--
AdrianLynch - 08 Nov 2001
Wow. Really simple!! Thanks, we'll try it soon.
--
MartinCleaver - 08 Nov 2001
Very nice. Works best when you remove the EDITBOXWIDTH options from people's pages.
Has a problem with
TigerSkin in that
TigerSkin specifies or requires a minimum width. If anyone has worked out what to change I'd much appreciate being told.
--
MartinCleaver - 28 Nov 2001
Altogether removal of the EDITBOXWIDTH variable may not be a good idea, unless there's a fairly easy-to-find (perhaps in the default note about the preference variables) note about using the more static width option if a user's browser doesn't reflect changes set in the EDITBOXCSS variable.
--
MikeMaurer - 12 Mar '02
This is now in
TWikiAlphaRelease but with prefs variable EDITBOXSTYLE instead of EDITBOXCSS. See also text in
TWiki.TWikiPreferences
--
PeterThoeny - 31 May 2002
I was set a variable EDITBOXSTYLE on our local Wiki even
before seeing the comment above! You are reading my thoughts, Peter!
--
MaximRomashchenko - 31 May 2002
Magic
Default is currently off (e.g.
width: auto
). The default could be changed to
width: 100%
. That would adjust the edit box width automatically be default. Any reason why not to change the default?
--
PeterThoeny - 31 May 2002
For now I set it to
width: 100%
at TWiki.org. Please let us know in case you experience any problem.
--
PeterThoeny - 01 Jun 2002
I think the default should be
width: 99%
. I've found that at times
MozillaBrowser and
InternetExplorerBrowser will render the text box slightly
too wide when set to 100%, and thus create horizontal scrollbars; 99% fixes this, at least for me. Now, if it's just something weird on my end, disregard this comment.
--
MikeMaurer - 2 Jun '02
Fixed that to 99%.
--
PeterThoeny - 05 Jun 2002
Width: 100%
being larger than the window is a known problem with IE. I've not heard or seen this with Mozilla, personally. What follows is just for your info, because the simplest solution in this context is just to use
width: 99%
.
A work around is to exploit a bug in the IE css parser:
/* IE stops reading at the "\"}\"" therefore we can tell IE
to use small width, and then the second size statement is
used by standards compliant browsers.
width: 99%;
voice-family: "\"}\"";
voice-family: inherit;
width: 100%;
*/
--
MattWilkie - 05 Jun 2002
On my internal TWiki, I also implemented auto height sizing as well. I added a table around the TEXTAREA which is height=80% width=99%, and then the textarea is set to height:100%;width:100% in a style. My technique has the benefit, and caviat, that if there are UI elements added to the edit page (such as a fancy Web Form) the textarea will NOT be smaller. If you want those forms to fit as well, wrap the entire edit page in a height=100% table, and stick all those UI items inside the table.
In order to do any of this, you need to REMOVE the
XHTML DTD specification from the htmldoctype macro in twiki.tmpl. It seems that
HTML-3/4 changed the rules for percentage based heights. In order to get reasonable behavior, you have to let the browser stay in "compatibility" rendering mode by leaving out the DTD specification.
--
DavidJeske - 23 May 2003
Hmm,
DavidJeske, Have you looked at the vertical sizing problem on
SlideShowPluginDev.
On that page
PeterThoeny asks (in a discussion about having the slide template totally
fill the screen):
- Yes, 100% (width) for the slide template is better. I do not think that it is possible to define 100% for the height. Anybody knows how to do that?
Would this method solve the slide sizing problem? You can see the sizing problem by looking
at the
SlideShowPlugin slide show with a screen larger than 800x600 or so. The slide
won't fill the screen.
--
JohnRouillard - 24 May 2003
Aargh. Two steps forward, one back. Still, removing the doctype should be okay as long as one isn't trying to use any features that rely on it (see
http://css-discuss.incutio.com/?page=QuirksRenderingMode). Thanks for figuring this out David!
--
MattWilkie - 24 May 2003
Category:
TWikiPatches