X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdiv%2Fplugin.js;h=2f954dc1155f150917a5b95dc0d73b9c5a1196e9;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=3a7ec8d6a2265800c50e3fe5baf1e1ad277e008f;hpb=941b0a9ba4e673e292510d80a5a86806994b8ea6;p=ckeditor.git diff --git a/_source/plugins/div/plugin.js b/_source/plugins/div/plugin.js index 3a7ec8d..2f954dc 100644 --- a/_source/plugins/div/plugin.js +++ b/_source/plugins/div/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -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 ) { @@ -37,17 +37,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license blockLimit = path.blockLimit, div = blockLimit.is( 'div' ) && blockLimit; - if ( div && !div.getAttribute( '_cke_div_added' ) ) + if ( div && !div.data( 'cke-div-added' ) ) { toRemove.push( div ); - div.setAttribute( '_cke_div_added' ); + div.data( 'cke-div-added' ); } } 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 ),