WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Front-End Editor] can I use an onclick event instead of doubleclick?

[Resolved] [Plugin: Front-End Editor] can I use an onclick event instead of doubleclick?

  • Does anyone know of a way to make the front-end editor plugin activate via an onclick event instead of double-clicking where you want to edit?

    Thx much.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The reason it uses doubleclick is so that links can still work. If you don’t care about that, you can edit inc/editor.js:

    replace these lines (18-20)

    field.el.click(field.click);
    
    field.el.dblclick(function(ev)

    with this:

    field.el.click(function(ev)

    Refresh your browser cache after this.

    This is not tested, but it should work.

    I meant clicking on something like an “edit this” link instead of clicking on the text at all. I’m using this plugin to enable certain users to edit things inline, and I’d like to be able to hide the link.

    The problem with that is visual clutter: usually, there are a lot of editable elements on a single page.

    Maybe something while hovering on an element would be better.

    In this case, there aren’t going to be any editable elements on the page except for the body text- this is for a wiki-like setup. In any case, what’s the function to call onclick (or whatever) to open the front-end editor and load text into it?

    There isn’t one, because it’s not that simple.

    In version 1.2, the user will see a yellow background when hovering over an editable element. You could just put a notice at the bottom of the page, saying something like “Double click on the yellow area to edit.”

    OK, that’ll do. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] [Plugin: Front-End Editor] can I use an onclick event instead of doubleclick?’ is closed to new replies.
Skip to toolbar