Ticket #4790: 4790.patch
File 4790.patch, 1.6 KB (added by , 13 years ago) |
---|
-
_source/plugins/list/plugin.js
12 12 var listNodeNames = { ol : 1, ul : 1 }, 13 13 emptyTextRegex = /^[\n\r\t ]*$/; 14 14 15 var whitespaces = CKEDITOR.dom.walker.whitespaces(), 16 bookmarks = CKEDITOR.dom.walker.bookmark(), 17 nonEmpty = function( node ){ return !( whitespaces( node ) || bookmarks( node ) ); }; 18 15 19 CKEDITOR.plugins.list = { 16 20 /* 17 21 * Convert a DOM list tree into a data structure that is easier to … … 125 129 if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT 126 130 && currentIndex != listArray.length - 1 ) 127 131 { 128 if ( currentListItem.getLast()129 && currentListItem.getLast().type == CKEDITOR.NODE_ELEMENT130 && currentListItem.getLast().getAttribute( 'type' ) == '_moz' )131 currentListItem.getLast().remove();132 currentListItem.appendBogus();133 }132 var last = currentListItem.getLast(); 133 if ( last && last.type == CKEDITOR.NODE_ELEMENT 134 && last.getAttribute( 'type' ) == '_moz' ) 135 { 136 last.remove(); 137 } 134 138 139 if ( !( last = currentListItem.getLast( nonEmpty ) 140 && last.type == CKEDITOR.NODE_ELEMENT 141 && last.getName() in CKEDITOR.dtd.$block ) ) 142 { 143 currentListItem.append( doc.createElement( 'br' ) ); 144 } 145 } 146 135 147 if ( currentListItem.type == CKEDITOR.NODE_ELEMENT && 136 148 currentListItem.getName() == paragraphName && 137 149 currentListItem.$.firstChild )