CKEditor 4格式标签

CKEditor 4格式标签,ckeditor,Ckeditor,我正在尝试更改ckeditor中的format_tags列表,使其不包含列表中的预格式化和地址,但如果我尝试放置: CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;'; 在我的config.js中,什么都没有发生-列表保持不变。我在这里遗漏了什么吗?因为您需要将其添加到编辑器配置中: CKEDITOR.editorConfig = function( config ) { config.format_tags = 'p;h1;h2;

我正在尝试更改ckeditor中的format_tags列表,使其不包含列表中的预格式化和地址,但如果我尝试放置:

CKEDITOR.config.format_tags = 'p;h1;h2;h3;h4;h5;h6;';

在我的config.js中,什么都没有发生-列表保持不变。我在这里遗漏了什么吗?

因为您需要将其添加到编辑器配置中:

CKEDITOR.editorConfig = function( config ) {
    config.format_tags = 'p;h1;h2;h3;h4;h5;h6;div';
};

如果您不想使用文件
config.js
(无论出于何种原因),您也可以这样做:

 CKEDITOR.replace( 'idofyourtextarea', {
    language: 'your_language', //for example 'es'
    height: 200,
    width: 300,
    format_tags: 'h1;h2;h3;h4;div' // <---here set the format tag
});
CKEDITOR.replace('idofyourtextarea'{
语言:'您的语言',//例如'es'
身高:200,
宽度:300,

format_tags:'h1;h2;h3;h4;div'//发生这种情况,因为您设置了
CKEDITOR.config.format_tags
,但当加载
format
插件时,它会覆盖您的配置。这就是为什么有
CKEDITOR.editorConfig
函数的原因。我如何在编辑器中添加额外的标记“p class=Intro”?@pr