Ticket #6461: 6461_2.patch
File 6461_2.patch, 1.4 KB (added by , 13 years ago) |
---|
-
_source/plugins/list/plugin.js
108 108 currentListItem = item.element.clone( false, true ); 109 109 else 110 110 { 111 // Create completely new blocks here, attributes are dropped. 112 if ( dir || ( paragraphMode != CKEDITOR.ENTER_BR && item.grandparent.getName() != 'td' ) ) 111 // Create completely new blocks here. 112 if ( dir || item.element.hasAttributes() || 113 ( paragraphMode != CKEDITOR.ENTER_BR && item.grandparent.getName() != 'td' ) ) 113 114 { 114 115 currentListItem = doc.createElement( paragraphName ); 115 if ( dir ) 116 currentListItem.setAttribute( 'dir', dir ); 116 item.element.copyAttributes( currentListItem, { type:1, value:1 } ); 117 dir && currentListItem.setAttribute( 'dir', dir ); 118 119 // There might be a case where there are no attributes in the element after all 120 // (i.e. when "type" or "value" are the only attributes set). In this case, if enterMode = BR, 121 // the current item should be a fragment. 122 if ( !dir && paragraphMode == CKEDITOR.ENTER_BR && !currentListItem.hasAttributes() ) 123 currentListItem = new CKEDITOR.dom.documentFragment( doc ); 117 124 } 118 125 else 119 126 currentListItem = new CKEDITOR.dom.documentFragment( doc );