[Moin-user] double click to edit.

Adam Shand adam at personaltelco.net
Sun Oct 28 23:01:01 EST 2001


if any one is interested i hacked my wiki to do this tonight.  it's pretty
straight forward though i'm sure i've done this the ugliest way possible
:)

you can test it here, double click anywhere on the page that doesn't
already have an action assigned to it and it will load the page up in an
edit window.  it's kinda cool cause it saves you moving up and down the
page to find the edit icon.

  http://www.personaltelco.net/

patch consists of adding this line to moin_config.py (pretty much
anywhere that makes you happy):

click_to_edit=1

then open up wikiutil.py, search for <body> and change this line:

print '<body>'

to this:

    print '<body'
    if config.click_to_edit:
        print """ondblclick="location.href='%s/%s?action=edit'" """ % (webapi.getScriptname(),quoteWikiname(keywords['pagename']))
    print '>'

i only have windows/ie at home right now so i have no idea if this will
work under linux or other browsers, hopefully it will.

adam.





More information about the Moin-user mailing list