// is not available, get the first one (default one).\r
lang = ( CKEDITOR.tools.indexOf( pluginLangs, editor.langCode ) >= 0 ? editor.langCode : pluginLangs[ 0 ] );\r
\r
- if ( !plugin.lang[ lang ] )\r
+ if ( !plugin.langEntries || !plugin.langEntries[ lang ] )\r
{\r
// Put the language file URL into the list of files to\r
// get downloaded.\r
}\r
else\r
{\r
- CKEDITOR.tools.extend( editor.lang, plugin.lang[ lang ] );\r
+ CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ lang ] );\r
lang = null;\r
}\r
}\r
\r
// Uses the first loop to update the language entries also.\r
if ( m === 0 && languageCodes[ i ] && plugin.lang )\r
- CKEDITOR.tools.extend( editor.lang, plugin.lang[ languageCodes[ i ] ] );\r
+ CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ languageCodes[ i ] ] );\r
\r
// Call the plugin method (beforeInit and init).\r
if ( plugin[ methods[ m ] ] )\r
if ( !noUpdate )\r
this.updateElement();\r
\r
+ this.fire( 'destroy' );\r
this.theme && this.theme.destroy( this );\r
\r
- this.fire( 'destroy' );\r
CKEDITOR.remove( this );\r
CKEDITOR.fire( 'instanceDestroyed', null, this );\r
},\r
* editor.\r
* @param {Function} callback Function to be called after the setData\r
* is completed.\r
+ *@param {Boolean} internal Whether suppress any event firing when copying data internally inside editor.\r
* @example\r
* CKEDITOR.instances.editor1.<b>setData</b>( '<p>This is the editor data.</p>' );\r
* @example\r
* this.checkDirty(); // true\r
* });\r
*/\r
- setData : function( data , callback )\r
+ setData : function( data , callback, internal )\r
{\r
if( callback )\r
{\r
\r
// Fire "setData" so data manipulation may happen.\r
var eventData = { dataValue : data };\r
- this.fire( 'setData', eventData );\r
+ !internal && this.fire( 'setData', eventData );\r
\r
this._.data = eventData.dataValue;\r
\r
- this.fire( 'afterSetData', eventData );\r
+ !internal && this.fire( 'afterSetData', eventData );\r
},\r
\r
/**\r