Not logged in. · Lost password · Register
Forum: General Help and Support Templates and Layout RSS
How to increase edit area size?
Avatar
raindog308 #1
Member since Apr 2012 · 6 posts
Group memberships: Members
Show profile · Link to this post
Subject: How to increase edit area size?
By default, dokuwiki presents an 10-row edit area.  I'd like to make it bigger (always).

I didn't find anything in configuration, and a grep for rows= didn't reveal anything...grepped for that based on the HTML I saw:

<textarea name="wikitext" id="wiki__text" class="edit" cols="80" rows="10" tabindex="1">
Avatar
lupo49 (Moderator) #2
Member since Jul 2009 · 1397 posts · Location: Warstein, Germany
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
It is the following line in lib/scripts/editor.js which defines the height:

$textarea.css('height', DokuCookie.getValue('sizeCtl') || '300px');

Instead of changing it directly in the file, try this:

conf/userscript.js

jQuery(function() {
    jQuery('#wiki__text').height('100px');
});
Avatar
ach (Administrator) #3
Member since May 2006 · 1333 posts · Location: London, UK
Group memberships: Administrators, Members, Super Mods, Wiki Managers
Show profile · Link to this post
Are you aware of the size controls? Your choice will be permanent as it is stored in a cookie.
Avatar
raindog308 #4
Member since Apr 2012 · 6 posts
Group memberships: Members
Show profile · Link to this post
No I wasn't :-)  That does fix the issue and no code mod needed.  Thank you both!
Avatar
csaba #5
Member since Oct 2012 · 2 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
I need to put userscript.js in /var/lib/dokuwiki/lib/tpl/dokuwiki.

conf is /etc/dokuwiki on debian, but it is not working from there.

Maybe it also works when it is at /usr/share/dokuwiki/lib/scripts/.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Current time: 2014-04-16, 12:27:37 (UTC +02:00)