X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fstylescombo%2Fplugin.js;h=e6c634b359ef8f86a8cd6624e5f58db9c201bdc1;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=74dd0b73094db13cc5468dfbc60b8c1f9d66cd69;hpb=1056598c95187351dc58f4991d331e2258d038b5;p=ckeditor.git diff --git a/_source/plugins/stylescombo/plugin.js b/_source/plugins/stylescombo/plugin.js index 74dd0b7..e6c634b 100644 --- a/_source/plugins/stylescombo/plugin.js +++ b/_source/plugins/stylescombo/plugin.js @@ -14,7 +14,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var config = editor.config, lang = editor.lang.stylesCombo, styles = {}, - stylesList = []; + stylesList = [], + combo; function loadStylesSet( callback ) { @@ -62,7 +63,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license init : function() { - var combo = this; + combo = this; loadStylesSet( function() { @@ -181,6 +182,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !counter[ CKEDITOR.STYLE_OBJECT ] ) this.hideGroup( lang[ 'panelTitle' + String( CKEDITOR.STYLE_OBJECT ) ] ); + }, + + // Force a reload of the data + reset: function() + { + if ( combo ) + { + delete combo._.panel; + delete combo._.list; + combo._.committed = 0; + combo._.items = {}; + combo._.state = CKEDITOR.TRISTATE_OFF; + } + styles = {}; + stylesList = []; + loadStylesSet(); } });