[pmwiki-users] Edit modes question. How to jump to end of textarea automacticly

Bart pmwiki-users at mediamatrix.nl
Tue Aug 29 11:50:28 CDT 2006

On Tue, Aug 29, 2006 at 05:33:27PM +0200, Clemens Gruber wrote:
| Bart wrote:
| >Unfortunately still a lot of keys to press when using Firefox :-(
| >
| >Alt+e to go to edit mode
| >Alt+, to jump to text area
| >Crtl+End to jump to end of textarea
| >
| >So if anyone is aware of a faster way doing this feel free to share
| > 
| >
| Hi Bart, I've played around with bookmarklets inspired by 
| http://article.gmane.org/gmane.comp.web.wiki.pmwiki.user/30241/
| Perhaps this can help you:
| Create a bookmark with
| - Name: Focus Editform PmWikiPage
| - Location: javascript:if (document.forms[1]) 
| {document.forms[1].text.focus()}
| This works now for a lot of standard PmWikis, with the same quantity and 
| order of forms (in standard PmWiki forms[0] is the search form and 
| forms[1] the edit form). Perhaps you can name the page edit form, then 
| you can use a more unique identifier.
| Or you can replace <body> in the standard template with
| <body onload="if (document.forms[1]) {document.forms[1].text.focus()};">
| In the most cases --I think it depends on the browser-- the cursor is an 
| the end of the text in the form. I don't know any JavaScirpt code to 
| influence the place the cursor appears and no command to move to the 
| bottom, but perhaps now it's time for Ctrl.+End. ;-)
| Clemens
| >Nevertheless the Crtl+End is  still a nice refinement of pressing the 
| >PageDown key which must be press several times when editing a extended 
| >page.
| >

Hi Clemens, 

Thanks for the code snippet, I like the <body> tag modification it skips the
Alt+, part and brings me close to what I like to achieve, easy editing :-)

Amazingly Firefox and IE 6.0 handle the event differently. IE 6.0 puts the
cursor at the begin of the textarea and Firefox on the end of the text
without scrolling down. 

Javascript implementations still keep amazing me :-)


More information about the pmwiki-users mailing list