[pmwiki-devel] Edit Form Attributes (width\height)

1 view
Skip to first unread message

Michael Elliott

unread,
Feb 2, 2021, 5:18:44 PM2/2/21
to pmwiki...@pmichaud.com
Hello,

In PMWiki where is the appropriate place to change\set the Edit TextArea Width (AKA cols) and height (AKA rows)?

I saw some obsolete Cookbooks and also tried editing Site.EditForm page adding properties to (:input e_textarea :) without success.


Thank you,

Michael

Petko Yotov

unread,
Feb 3, 2021, 2:28:27 AM2/3/21
to Michael Elliott, pmwiki...@pmichaud.com
Some skins use a separate edit form page, not Site.EditForm -- check the
skin documentation.

To set it by default for all users, add to config.php:

$XL['en']['e_cols'] = 90;
$XL['en']['e_rows'] = 12;

If you're loading a different language via XLPage(), change the key 'en'
with the key for your language e.g. 'fr' for French. If you're using
multiple languages, add them as new lines.

Independently of the above, you and other users can set their own
preferences for this, see the pages:

https://www.pmwiki.org/wiki/PmWiki/SitePreferences
https://www.pmwiki.org/wiki/Site/Preferences

They need to create on your own wiki a page Group.MyPrefs with the
settings and follow a link like ?setprefs=Group.MyPrefs. Then their
preferences page is remembered in a cookie and will be parsed to get the
numbers when they edit a page.

Also note that some skins may use a different edit form, and/or set the
textarea width and height via CSS (which overrides the cols and rows
attributes). The PmWiki-responsive skin for example sets the textarea
width. In that case, you can set the width and height in the file
pub/css/local.css (which normally overrides the skin's CSS file):

#wikiedit textarea {
width: 99.5%;
max-width: 99.5%;
max-height: 60vh;
}

If it is a core skin, or one from the cookbook, this allows you to keep
the original skin and is easier to update the skin to a new version
without losing your customization.

(The selector "#wikiedit textarea" should be standard for most skins but
some skins may use their own CSS classes and identifiers. If you have
difficulties, ask the maintainer of the skin -- or here on the mailing
list.)

Petko

_______________________________________________
pmwiki-devel mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Michael Elliott

unread,
Feb 3, 2021, 3:43:54 PM2/3/21
to Petko Yotov, pmwiki...@pmichaud.com
Thank you Petko.

Reply all
Reply to author
Forward
0 new messages