X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Feditingblock%2Fplugin.js;h=c3e48d2ca7b5e4c2a673809c6d8d2ddcaf050605;hb=8f6c203fdaa543c3bca40baea6ae4ddcdf1a77f5;hp=8d54142d5992aa49601386bd3db510474b648300;hpb=059b4c2fef02528bf1af189f7996e80652faddfb;p=ckeditor.git diff --git a/_source/plugins/editingblock/plugin.js b/_source/plugins/editingblock/plugin.js index 8d54142..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; } }); @@ -95,6 +95,12 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Do that once only. event.removeListener(); + // Redirect the focus into editor for webkit. (#5713) + CKEDITOR.env.webkit && editor.container.on( 'focus', function() + { + editor.focus(); + }); + if ( editor.config.startupFocus ) editor.focus(); @@ -104,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' ) ); + }); } }); @@ -205,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. @@ -222,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 + */