Ticket #3657: 3657_3.patch
File 3657_3.patch, 1.7 KB (added by , 15 years ago) |
---|
-
_source/plugins/wysiwygarea/plugin.js
15 15 */ 16 16 var nonExitableElementNames = { table:1,pre:1 }; 17 17 18 /** 19 * IE has already preserved an editing position after table. 20 */ 21 if( CKEDITOR.env.ie ) 22 delete nonExitableElementNames.table; 23 18 24 function onInsertHtml( evt ) 19 25 { 20 26 if ( this.mode == 'wysiwyg' ) … … 108 114 } 109 115 110 116 /** 111 * Auto-fixing block-less content by wrapping paragraph , prevent112 * non-exitable-block by padding extra br. 117 * Auto-fixing block-less content by wrapping paragraph (#3190), prevent 118 * non-exitable-block by padding extra br.(#3189) 113 119 */ 114 120 function onSelectionChangeFixBody( evt ) 115 121 { 116 122 var editor = evt.editor, 117 123 path = evt.data.path, 118 124 blockLimit = path.blockLimit, 125 selection = evt.data.selection, 126 selectedElement = selection.getSelectedElement(), 119 127 body = editor.document.getBody(), 120 128 enterMode = editor.config.enterMode; 121 129 122 // When enterMode set to block, we'll establing new paragraph if the123 // current range is block-less within body.130 // When enterMode set to block, we'll establing new paragraph only if we're 131 // selecting inline contents right under body. (#3657) 124 132 if ( enterMode != CKEDITOR.ENTER_BR 125 133 && blockLimit.getName() == 'body' 126 && !path.block ) 134 && !path.block 135 && !( selectedElement && selectedElement.isBlockLike && selectedElement.isBlockLike() ) ) 127 136 { 128 137 var selection = evt.data.selection, 129 138 range = evt.data.selection.getRanges()[0],