【发布时间】:2016-02-09 13:48:36
【问题描述】:
我正在尝试向我的 ckeditor 添加一个灯箱插件,但它不起作用。我从here下载了插件。
当我解压缩它时,我有两个文件,第一个文件我复制到 CKEditor 插件文件夹,另一个我复制到我的根文件夹,我在我的文件头中包含了 lightbox_plus.js 文件的路径。在 lightbox_plus.js 文件中,我将 ligthbox 文件夹的路径更改为 var LightboxPlus_rootpath = '';
我为 CKEditor 使用自定义配置文件。在 config.js 中,我将 config.extraPlugins = 'lightbox'; 添加到我的自定义文件中。文件是:
CKEDITOR.editorConfig = function( config ) {
config.extraPlugins = 'lightbox';
config.toolbarGroups = [
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
{ name: 'forms', groups: [ 'forms' ] },
{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
{ name: 'paragraph', groups: [ 'list', 'indent', 'blocks', 'align', 'bidi', 'paragraph' ] },
{ name: 'insert', groups: [ 'insert' ] },
{ name: 'links', groups: [ 'links', 'lightbox' ] },
{ name: 'tools', groups: [ 'tools' ] },
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
'/',
'/',
{ name: 'styles', groups: [ 'styles' ] },
{ name: 'colors', groups: [ 'colors' ] },
{ name: 'others', groups: [ 'others' ] },
{ name: 'about', groups: [ 'about' ] }
];
config.removeButtons = 'Source,Save,Templates,NewPage,Preview,Print,Cut,Copy,Paste,PasteText,PasteFromWord,Find,Replace,SelectAll,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,HiddenField,ImageButton,BidiLtr,BidiRtl,Language,Flash,PageBreak,About';
};
CKEditor 是:
CKEDITOR.replace( 'txtEmailContent', {
extraPlugins: 'imageuploader',
customConfig: 'custom/ckeditor_config.js'
});
但是什么也没发生。我在工具栏中没有看到灯箱图标,也无法执行任何操作。
有什么建议吗?
【问题讨论】:
标签: javascript ckeditor lightbox