[pmwiki-users] Adjusting edit window height

Hans Bracker design at softflow.co.uk
Sun Jun 22 12:58:54 CDT 2014


Hello David,

Thursday, June 19, 2014, 2:54:46 PM, you wrote:

> Using the Triad skin (and I have updated to pmwiki 2.2.65)

> I did figure out how to adjust the Edit window height site-wide in the
> Triad skin. It was my not understanding that the 
> Site.Triad-Configuration was the actual file I needed to modify. :-P

> Yet to figure out:
> 1) How to set the Edit window height for each User (because of different
> monitor resolutions)
> 2) Set the default Edit window height for a specific group(s)

I  think for your purpose it may be best to set the attributes for the
edit  textarea element with css, and not via Site.Triad-Configuration,
which sets the attributes in HTML.

So  to  give  different attributes to it according to screen sizes you
could    put    something   like   the   following   into   the   file
pub/css/local.css, using the @media rule:

@media screen and (max-device-width: 640px){
        textarea#text {
                width:70em;
                height:20em;
        }
}
@media screen and (min-device-width: 1024px){
        textarea#text {
                width:100%;
                height:40em;
        }
}

just  change  all  the  numbers to suit your purpose, and observe the
nested curly brackets!

Doing this in local.css will affect all pages of the wiki, and the css
rules will override the HTML attributes for rows and cols.

Then  to  set  attributes  for specific groups, create a group specific
css file in pub/css/ , for instance Main.css for the Main group, and
put  in  your  group-specific  css rules there. A rule in the Group
specific css file will override the corresponding rule in local.css.

That  should  be  enough. The textarea#text element should be specific
enough  for  the  edit textarea, which has the id "text". If there are
conflicts with other textarea HTML elements, you may need to edit the
wiki  page  Site/Popup-EditForm, which Triad uses by default, to add a
specific class for instance, and refer to this in the css files.

Hope this helps!

cheers,
Hans




More information about the pmwiki-users mailing list