Changeset 295

Show
Ignore:
Timestamp:
2007-05-09 21:44:59 (3 years ago)
Author:
alfonsoml
Message:

Fix for #467, the selection.createRange().pasteHTML() function didn't paste initial comments, so let's add an extra node and remove it.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fck_ie.js

    r257 r295  
    164164                oSel.clear() ; 
    165165 
     166        // Using the following trick, any comment in the begining of the HTML will 
     167        // be preserved. 
     168        html = '<span id="__fakeFCKRemove__">&nbsp;</span>' + html ; 
     169 
    166170        // Insert the HTML. 
    167171        oSel.createRange().pasteHTML( html ) ; 
     172 
     173        // Remove the fake node 
     174        FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ; 
    168175 
    169176        FCKDocumentProcessor.Process( FCK.EditorDocument ) ; 
  • FCKeditor/trunk/_whatsnew.html

    r285 r295  
    7474                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/416">#416</a>] The PHP quick upload 
    7575                        didn't check for the existence of the folder before saving.</li> 
     76                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/467">#467</a>] If InsertHtml was 
     77                        called in IE with a comment (or any protected source at the beggining) it was lost.</li> 
    7678        </ul> 
    7779        <h3>