Ticket #3664: 3664_3.patch
File 3664_3.patch, 1.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
81 81 82 82 // If we're inserting a block at dtd-violated position, split 83 83 // the parent blocks until we reach blockLimit. 84 var parent, dtd;85 if ( this.config.enterMode != CKEDITOR.ENTER_BR &&isBlock )84 var current, dtd; 85 if ( isBlock ) 86 86 { 87 while( ( parent = range.getCommonAncestor( false, true ) )88 && ( dtd = CKEDITOR.dtd[ parent.getName() ] )87 while( ( current = range.getCommonAncestor( false, true ) ) 88 && ( dtd = CKEDITOR.dtd[ current.getName() ] ) 89 89 && !( dtd && dtd [ elementName ] ) ) 90 90 { 91 range.splitBlock(); 91 // If we're in an empty block which indicate a new paragraph, 92 // simply replace it with the inserting block.(#3664) 93 if ( range.checkStartOfBlock() 94 && range.checkEndOfBlock() ) 95 { 96 range.setStartBefore( current ); 97 range.collapse( true ); 98 current.remove(); 99 } 100 else 101 range.splitBlock(); 92 102 } 93 103 } 94 104