【问题标题】:Lightbox and CKEditor灯箱和CKEditor
【发布时间】: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


    【解决方案1】:

    这是 CKEditor 3 插件,一个非常古老的插件。如果您使用的是 CKEditor 4,请尝试在 CKEditor 4 Add-ons Repository 中搜索类似的功能。

    【讨论】:

    • 这是一个第三方插件。如果按照作者给出的说明配置后还是不行,请在插件cmets中告知作者。请注意some users reported issues,因此无法保证您的问题会得到解决。
    • 我看到很多用户对此有问题,但作者不回答。这就是我试图在这里寻求帮助的原因。
    • 如果是这种情况,并且您似乎在 cmets 或 StackOverflow 上都没有找到可行的解决方案,那么您可能会认为它不起作用 :) 随意创建自己的工作解决方案并与社区分享 - 很多用户可能会喜欢它!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多