It's better when it's simple

User Tools

Site Tools


This is an old revision of the document!

Double Click to Open a Section Edit (improved)

The javascript snippet below adds the ability to double-click a section of an article to go straight to the edit mode for that section.

It is easy to add it. Just create a script.js file under your templates directory (for eg lib/tpl/default/script.js) and append the following code snippet to it:

    $dokuWiki = jQuery('.dokuwiki');
     * If one or more edit section buttons exist?
     * This makes sure this feature is enabled only on the edit page and for users with page edit rights.
    if (jQuery('.editbutton_section', $dokuWiki).length > 0) {
        // register double click event for all headings and section divs
        jQuery('[class^="sectionedit"], div[class^="level"]', $dokuWiki).dblclick(function(){
            // find the closest edit button form to the element double clicked (downwards) and submit the form

Tested on Release 2012-01-25b “Angua”

The functionality of the code has been commented inline. Submit any improvements and fixes you may have.

For queries, contact the author on

tips/double-click-to-edit.1346015417.txt.gz · Last modified: 2012-08-26 23:10 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki