diff -up -urwbB /home/jreed/tmp/fck/2.4/fckeditor/editor/_source/classes/fckstyledef_ie.js editor/_source/classes/fckstyledef_ie.js
|
old
|
new
|
FCKStyleDef.prototype.ApplyToSelection = |
| 31 | 31 | |
| 32 | 32 | if ( oSelection.type == 'Text' ) |
| 33 | 33 | { |
| 34 | | var oRange = oSelection.createRange() ; |
| 35 | | |
| 36 | | // Create the main element. |
| 37 | | var e = document.createElement( this.Element ) ; |
| 38 | | e.innerHTML = oRange.htmlText ; |
| 39 | | |
| 40 | | // Set the attributes. |
| 41 | | this._AddAttributes( e ) ; |
| 42 | | |
| 43 | | // Remove the duplicated elements. |
| 44 | | this._RemoveDuplicates( e ) ; |
| 45 | | |
| 46 | | // Replace the selection with the resulting HTML. |
| 47 | | oRange.pasteHTML( e.outerHTML ) ; |
| | 34 | var oControl = FCK.ToolbarSet.CurrentInstance.Selection.GetParentElement() ; |
| | 35 | if ( oControl.tagName == this.Element ) |
| | 36 | this._AddAttributes( oControl ) ; |
| 48 | 37 | } |
| 49 | 38 | else if ( oSelection.type == 'Control' ) |
| 50 | 39 | { |
| … |
… |
FCKStyleDef.prototype.IsEqual = function |
| 101 | 90 | if ( e.style.cssText.toLowerCase() != this.Attributes[a].toLowerCase() ) |
| 102 | 91 | return false ; |
| 103 | 92 | break ; |
| | 93 | case 'src' : |
| | 94 | var src = e.getAttribute( '_fcksavedurl' ) ; |
| | 95 | if (src == null) src = e.getAttribute( a, 0 ); |
| | 96 | if (src != this.Attributes[a]) |
| | 97 | return false; |
| | 98 | break; |
| 104 | 99 | case 'class' : |
| 105 | 100 | if ( e.getAttribute( 'className', 0 ) != this.Attributes[a] ) |
| 106 | 101 | return false ; |
diff -up -urwbB /home/jreed/tmp/fck/2.4/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js editor/_source/classes/fcktoolbarstylecombo.js
|
old
|
new
|
FCKToolbarStyleCombo.prototype.RefreshAc |
| 101 | 101 | |
| 102 | 102 | FCKToolbarStyleCombo.prototype.RefreshVisibleItems = function( targetSpecialCombo ) |
| 103 | 103 | { |
| | 104 | var sTagName; |
| | 105 | |
| 104 | 106 | if ( FCKSelection.GetType() == 'Control' ) |
| 105 | | var sTagName = FCKSelection.GetSelectedElement().tagName ; |
| | 107 | sTagName = FCKSelection.GetSelectedElement().tagName ; |
| | 108 | else |
| | 109 | { |
| | 110 | if (FCKBrowserInfo.IsIE) |
| | 111 | { |
| | 112 | var e = FCKSelection.GetParentElement(); |
| | 113 | if (!e) return; |
| | 114 | sTagName = e.tagName ; |
| | 115 | } |
| | 116 | } |
| 106 | 117 | |
| 107 | 118 | for ( var i in targetSpecialCombo.Items ) |
| 108 | 119 | { |