Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ckeditor 自定义路径/到/插件_Ckeditor_Ckeditor4.x - Fatal编程技术网

Ckeditor 自定义路径/到/插件

Ckeditor 自定义路径/到/插件,ckeditor,ckeditor4.x,Ckeditor,Ckeditor4.x,根据文档,插件和小部件将存储在/ckeditor\u root/plugins/plugindir中 当我计划为内容管理系统开发一个小部件时,我更愿意将插件存储在cms的资产中 ckeditor设计允许这样做吗 干杯 Oliver要从本地文件夹启用额外插件,必须首先调用它,以便CKEditor知道从何处加载插件 // Enable local "abbr" plugin from the "/myplugins/abbr/" folder. CKEDITOR.plugins.addExterna

根据文档,插件和小部件将存储在/ckeditor\u root/plugins/plugindir中

当我计划为内容管理系统开发一个小部件时,我更愿意将插件存储在cms的资产中

ckeditor设计允许这样做吗

干杯


Oliver

要从本地文件夹启用额外插件,必须首先调用它,以便CKEditor知道从何处加载插件

// Enable local "abbr" plugin from the "/myplugins/abbr/" folder.
CKEDITOR.plugins.addExternal( 'abbr', '/myplugins/abbr/', 'plugin.js' );

// config.extraPlugins needs to be set, too.
CKEDITOR.replace( 'editor1', {
   extraPlugins: 'abbr'
} );
CKEDITOR.plugins.addExternal()方法接受三个参数:

  • 插件的名称
  • 插件的位置。确保路径以斜杠字符(“/”)开头
  • 文件名(通常为“plugin.js”)

非常感谢你,安娜。这就是我要找的。很乐意帮忙。如果这解决了您的问题,您能否将答案标记为已接受?这将有助于其他可能在未来寻求相同问题解决方案的人。我猜是左边的绿色勾号。