Ignore:
Timestamp:
11/15/10 16:15:48 (10 years ago)
Author:
ejucovy
Message:

Fix editor._createLink confusion, closes ticket:1553

  • editor.execCommand("createlink") is now the standard way to trigger a link-creation action
  • under the hood, this calls an editor._createLink method
  • core itself doesn't define editor._createLink -- instead, modules/CreateLink or plugins/Linker defines that method
  • double-clicking on an existing link to edit that link now works

It is also possible to trigger a link-edit action independent of the cursor position/selection.
The way to do this is editor.execCommand("createlink", false, anchorEl)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/DoubleClick/DoubleClick.js

    r1067 r1271  
    3838  this.editor.dblClickList = { 
    3939    // Edit Link dialog 
    40     a: [ function(e) {e.config.btnList['createlink'][3](e); } ], 
     40    a: [ function(e, target) {e.execCommand("createlink", false, target);} ], 
    4141    // Follow link 
    4242    //a: [ function(editor, target) { window.location = target.href; properties(target); } ], 
Note: See TracChangeset for help on using the changeset viewer.