CKEditor:多个 config.js 个文件

CKEditor: Multiple config.js files

我有 2 HTML 个页面使用 CKEditor。

在第 1 页中,我想使用默认的 config.js 文件。

在第 2 页中,我想使用自定义 config.js 文件。

我该如何实现?

谢谢!

您可以 customConfig 选项并指定配置文件的路径

CKEDITOR.replace( 'editor1', {
    customConfig: '/custom/ckeditor_config.js'
});

更多信息 - https://docs.ckeditor.com/ckeditor4/docs/?mobile=/guide/dev_configuration

谢谢!

不是程序员,我不得不玩一点。

在第 2 页(html 文件)的 </head> 标签之前,我添加了以下代码:

<script type="text/javascript">
    CKEDITOR.config.customConfig = "../customfolder/config.js";
    CKEDITOR.replace(content);
</script>

"content"是文本区域的名称。

谢谢