Tuesday, January 12, 2016

PmWiki textarea autofocus

I often end up tweaking various tools to avoid having to reach for the mouse as the first action (i.e., to focus on a field before entering text).  Following is a modification for auto-focusing the editor textarea in PmWiki.  Note: assumption is that the Triad skin is employed.

1) Find pub/skins/triad/wikilib.d/Site.Popup-EditForm and open it in an editor.

2) In that file, there is only one instance of "textarea". It looks like:

  (:input e_textarea :)

Make it look like:

  (:input e_textarea focus=1:)

3) Save and exit

After that, whenever you open the edit function, the main textarea should already have focus.

No comments:

Post a Comment