X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdiv%2Fplugin.js;h=158070fa69b6beaf691607c5c69e2fca23488c95;hb=refs%2Ftags%2Fv3.4;hp=3a7ec8d6a2265800c50e3fe5baf1e1ad277e008f;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/div/plugin.js b/_source/plugins/div/plugin.js index 3a7ec8d..158070f 100644 --- a/_source/plugins/div/plugin.js +++ b/_source/plugins/div/plugin.js @@ -12,7 +12,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { CKEDITOR.plugins.add( 'div', { - requires : [ 'editingblock', 'domiterator' ], + requires : [ 'editingblock', 'domiterator', 'styles' ], init : function( editor ) { @@ -47,7 +47,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license for ( var i = 0 ; i < ranges.length ; i++ ) { range = ranges[ i ]; - if( range.collapsed ) + if ( range.collapsed ) findDiv( selection.getStartElement() ); else { @@ -95,7 +95,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { editor.contextMenu.addListener( function( element, selection ) { - if ( !element ) + if ( !element || element.isReadOnly()) return null; var elementPath = new CKEDITOR.dom.elementPath( element ),