Ticket #1537: 1537_2.patch
File 1537_2.patch, 1.6 KB (added by , 14 years ago) |
---|
-
editor/_source/internals/fck_ie.js
172 172 oSel.createRange().pasteHTML( html ) ; 173 173 174 174 // Remove the fake node 175 FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ; 175 var fake = FCK.EditorDocument.getElementById('__fakeFCKRemove__') ; 176 // If the span is the only child of a node (so the inserted HTML is beyond that), 177 // remove also that parent that isn't needed. #1537 178 if (fake.parentNode.childNodes.length == 1) 179 fake = fake.parentNode ; 180 fake.removeNode( true ) ; 176 181 177 182 FCKDocumentProcessor.Process( FCK.EditorDocument ) ; 178 183 -
editor/_source/internals/fck_gecko.js
375 375 376 376 range = new FCKDomRange( this.EditorWindow ) ; 377 377 range.MoveToSelection() ; 378 379 // If the first element (if exists) of the document fragment is a block 380 // element, then split the current block. (#1537) 381 var currentNode = docFrag.RootNode.firstChild ; 382 while ( currentNode && currentNode.nodeType != 1 ) 383 currentNode = currentNode.nextSibling ; 384 385 if ( currentNode && FCKListsLib.BlockElements[ currentNode.nodeName.toLowerCase() ] ) 386 range.SplitBlock() ; 387 378 388 range.DeleteContents() ; 379 389 range.InsertNode( docFrag.RootNode ) ; 380 390