我有编辑器配置
CKEDITOR.editorConfig = function( config ) {
config.extraPlugins = 'jqueryspellchecker';
config.toolbar = 'Basic';
config.toolbar_Basic =
[
['Bold', 'Italic', '-', 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
'-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock', '-', 'Link', 'Unlink','-', 'Image','Table','HorizontalRule',
'Smiley','SpecialChar','PageBreak', 'Styles','Format','Font','FontSize' , 'TextColor',
'BGColor','jQuerySpellChecker', 'Source']
];
和我的ckeditor都有语言-'lt',但是我可以从网站上动态更改它。
和plugin.js
CKEDITOR.plugins.add('jqueryspellchecker', {
config: {
lang: 'lt',
parser: 'html',
webservice: {
path: '/new/layout/editor/plugins/jqueryspellchecker/webservices/php/SpellChecker.php',
driver: 'pspell'
},
suggestBox: {
position: 'below',
appendTo: 'body'
}
},
init: function( editor ) {
var t = this;
var pluginName = 'jqueryspellchecker';
this.config.suggestBox.position = this.positionSuggestBox();
editor.addCommand(pluginName, {
canUndo: false,
readOnly: 1,
exec: function() {
t.toggle(editor);
}
});
editor.ui.addButton('jQuerySpellChecker', {
label: 'SpellCheck',
icon: 'spellchecker',
command: pluginName,
toolbar: 'spellchecker,10'
});
editor.on('saveSnapshot', function() {
t.destroy();
});
},
当我在网站上更改编辑器语言时,如何更改plugin.js配置语言?