我正在尝试更改我的语言定义的值。我需要在创建编辑器实例的地方和特定条件下执行此操作。
我不想更改语言文件,因为该文件本身就很好,而且同一网站上的其他编辑器不需要特定的修改。
有人能帮我吗?我正在使用 CKEDITOR 3.6.1
$("form textarea").each(function()
{
var name = $(this).attr("name");
var instance = CKEDITOR.instances[name];
if(instance)
{
CKEDITOR.instances[name].destroy(true)
}
CKEDITOR.config.format_tags = 'h1;p';
CKEDITOR.config.format_p = { element : 'p', attributes : { 'class' : 'my_class' } };
//if(condition) CKEDITOR.config.lang.es.tag_h1 = "My special header";
//if(condition) CKEDITOR.lang.es.tag_h1 = "My special header";
CKEDITOR.replace(name);
});