X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=c3e48d2ca7b5e4c2a673809c6d8d2ddcaf050605;hb=refs%2Ftags%2Fv3.5.2;hp=d0bbde85b7398778c3f381a3e04edc2002967d90;hpb=f8fc585c18d287eb325c575596d183122486b641;p=ckeditor.git diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index d0bbde8..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; } }); @@ -110,8 +110,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license setTimeout( function(){ editor.fireOnce( 'instanceReady' ); CKEDITOR.fire( 'instanceReady', null, editor ); - } ); + }, 0 ); }); + + editor.on( 'destroy', function () + { + // -> currentMode.unload( holderElement ); + if ( this.mode ) + this._.modes[ this.mode ].unload( this.getThemeSpace( 'contents' ) ); + }); } }); @@ -211,7 +218,6 @@ CKEDITOR.config.startupMode = 'wysiwyg'; * @example * config.startupFocus = true; */ -CKEDITOR.config.startupFocus = false; /** * Whether to render or not the editing block area in the editor interface. @@ -228,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 + */