Ignore:
Timestamp:
11/15/10 16:15:48 (9 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/modules/CreateLink/link.js

    r1084 r1271  
    2929        var self = this; 
    3030 
    31    editor.config.btnList.createlink[3] = function() { self.show(self._getSelectedAnchor()); } 
     31        if(typeof editor._createLink == 'undefined') { 
     32            editor._createLink = function(target) { 
     33                if(!target) target = self._getSelectedAnchor(); 
     34                self.show(target); 
     35            } 
     36        } 
    3237} 
    3338 
Note: See TracChangeset for help on using the changeset viewer.