X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=c3e48d2ca7b5e4c2a673809c6d8d2ddcaf050605;hb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5;hp=f58116a7c38d39d2632d56a14f1e9657e4ced4d6;hpb=039a051ccf3901311661022a30afd60fc38130c9;p=ckeditor.git diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index f58116a..c3e48d2 100644 --- a/_source/plugins/editingblock/plugin.js +++ b/_source/plugins/editingblock/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 */ @@ -71,7 +71,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !isHandlingData && editor.mode ) { isHandlingData = true; - editor.setData( getMode( editor ).getData() ); + editor.setData( getMode( editor ).getData(), null, 1 ); isHandlingData = false; } }); @@ -112,6 +112,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.fire( 'instanceReady', null, editor ); }, 0 ); }); + + editor.on( 'destroy', function () + { + // -> currentMode.unload( holderElement ); + if ( this.mode ) + this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) ); + }); } }); @@ -227,3 +234,15 @@ CKEDITOR.config.editingBlock = true; * @event * @param {CKEDITOR.editor} editor The editor instance that has been created. */ + +/** + * Fired when the CKEDITOR instance is created, fully initialized and ready for interaction. + * @name CKEDITOR.editor#instanceReady + * @event + */ + +/** + * Fired before changing the editing mode + * @name CKEDITOR.editor#beforeModeUnload + * @event + */