X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdiv%2Fplugin.js;h=f19efc08b9a4fb41309e3de6403fb97ea01f630e;hb=3fe9cac293e090ea459a3ee10d78cbe9e1dd0e03;hp=0714deeb25eef989eaa4ed847fdad08867a34337;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/div/plugin.js b/_source/plugins/div/plugin.js index 0714dee..f19efc0 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-2013, 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', 'styles' ], + requires : [ 'editingblock', 'dialog', 'domiterator', 'styles' ], init : function( editor ) { @@ -37,10 +37,10 @@ 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' ); } } @@ -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 ),