CKEditor的格式插件无法在Wordpress中运行

时间:2014-07-30 02:48:03

标签: php wordpress plugins ckeditor

我在我的Wordpress网站上安装了CKEditor插件,我想分配段落格式"正常(div)"一堂课。

我尝试通过向插件文件夹添加插件来安装FORMAT插件(以及所有依赖项)并添加:

config.extraPlugins = 'panel,button,listblock,floatpanel,richcombo,format';

进入CKEDITOR.config.html I followed the instructions

(我尝试将插件文件保存到WP/wp-content/plugins/ckeditor-for-wordpress/plugins and WP/wp-content/plugins/ckeditor-for-wordpress/ckeditor/plugins

我编辑了plugin.js(FORMAT插件),但没有发生任何事情:

/**
 * The style definition to be used to apply the `'Normal (DIV)'` format. 
 *      config.format_div = { element : 'div', attributes : { 'class' : 'myClass' } };
 * @cfg {Object} [format_div={ element: 'div' }]
 * @member CKEDITOR.config
 */

CKEDITOR.config.format_div = { element : 'div', attributes : { 'class' : 'myClass' } };`

我做错了什么?

我可以在没有插件的情况下为div分配一个类,也许可以在ckeditor.sj文件中的CKEDITOR.config.format_div={element:"div"}行添加一些内容吗?

1 个答案:

答案 0 :(得分:0)

也许订单很重要?以下对我有用:

config.extraPlugins = 'panel,floatpanel,listblock,button,richcombo,format';

另外,我发现CKBuilder有点无益,因为它没有下载我的所有插件目录。所以我不得不手动安装所有上述插件。