Ticket #656: insertNodeAtSelection.patch

File insertNodeAtSelection.patch, 966 bytes (added by mokhet, 14 years ago)
  • htmlarea.js

     
    27622762/** Returns a node after which we can insert other nodes, in the current 
    27632763 * selection.  The selection is removed.  It splits a text node, if needed. 
    27642764 */ 
    2765 HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) { 
    2766   if (!HTMLArea.is_ie) { 
     2765if (!HTMLArea.is_ie) { 
     2766  HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) { 
    27672767    var sel = this._getSelection(); 
    27682768    var range = this._createRange(sel); 
    27692769    // remove the current selection 
     
    28022802      this.updateToolbar(); 
    28032803      break; 
    28042804    } 
    2805   } else { 
     2805  }; 
     2806} else { 
     2807  HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) { 
    28062808    return null;        // this function not yet used for IE <FIXME> 
    2807   } 
     2809  }; 
    28082810}; 
    28092811 
    28102812// Returns the deepest node that contains both endpoints of the selection.