Ticket #2368: 2368_2.patch

File 2368_2.patch, 1.6 KB (added by martinkou, 20 months ago)
  • _whatsnew.html

     
    101101                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2376">#2376</a>] FCK.InsertHtml() 
    102102                        will now insert to the last selected position after the user has selected things outside 
    103103                        of FCKeditor, in IE.</li> 
     104                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2368">#2368</a>] Fixed broken protect  
     105                        source logic for comments in IE.</li> 
    104106        </ul> 
    105107        <p> 
    106108                <a href="_whatsnew_history.html">See previous versions history</a></p> 
  • editor/_source/internals/fck.js

     
    11011101        ToHtml : function() 
    11021102        { 
    11031103                for ( var i = 0 ; i < this.Elements.length ; i++ ) 
    1104                         this.Elements[i] = this.Elements[i].outerHTML ; 
     1104                { 
     1105                        this.Elements[i] = '<div>&nbsp;' + this.Elements[i].outerHTML + '</div>' ; 
     1106                        this.Elements[i].isHtml = true ; 
     1107                } 
    11051108        }, 
    11061109 
    11071110        ToElements : function() 
     
    11091112                var node = FCK.EditorDocument.createElement( 'div' ) ; 
    11101113                for ( var i = 0 ; i < this.Elements.length ; i++ ) 
    11111114                { 
    1112                         if ( typeof( this.Elements[i] ) == 'string' ) 
     1115                        if ( this.Elements[i].isHtml ) 
    11131116                        { 
    11141117                                node.innerHTML = this.Elements[i] ; 
    1115                                 this.Elements[i] = node.firstChild ; 
     1118                                this.Elements[i] = node.firstChild.removeChild( node.firstChild.lastChild ) ; 
    11161119                        } 
    11171120                } 
    11181121        }