Changeset 126


Ignore:
Timestamp:
05/09/05 08:30:58 (9 years ago)
Author:
gocher
Message:

insertAnchor changes for IE

Location:
trunk/plugins/InsertAnchor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/InsertAnchor/insert-anchor.css

    r25 r126  
    22  width: 18px; 
    33  height: 18px; 
    4   background: url(img/insert-anchor.gif) no-repeat; 
     4  background-image: url(img/insert-anchor.gif); 
     5  background-repeat: no-repeat; 
     6  background-position: left top; 
     7  padding-left: 19px; 
    58  border: 1px dotted blue; 
    69} 
    7  
    8 /* For Gecko browsers we need the following code to make anchor visible */ 
    9 a.anchor:before { content:url(img/placeholder.gif); } 
  • trunk/plugins/InsertAnchor/insert-anchor.js

    r125 r126  
    6363InsertAnchor.prototype.buttonPress = function(editor) { 
    6464  var outparam = null; 
     65  var html = editor.getSelectedHTML(); 
    6566  var sel  = editor._getSelection(); 
    6667  var range  = editor._createRange(sel); 
     
    6970    a = editor._getFirstAncestor(sel, 'a');  
    7071  } 
    71   if (a != null && a.tagName.toLowerCase() == 'a') { 
     72  if (a != null && a.tagName.toLowerCase() == 'a') 
    7273    outparam = { name : a.id }; 
    73   } else 
     74  else 
    7475    outparam = { name : '' }; 
    7576 
     
    9495          a.title = anchor; 
    9596          a.className = "anchor"; 
    96           a.innerHTML = sel;  
     97          a.innerHTML = html; 
    9798          if (HTMLArea.is_ie) { 
    9899            range.pasteHTML(a.outerHTML); 
Note: See TracChangeset for help on using the changeset viewer.