如何将Wiris插件添加到CKEditor?

时间:2015-01-05 04:52:45

标签: ruby-on-rails ckeditor

我正在使用CKEditor集成的Rails应用程序。

我无法将Wiris插件集成到其中

我的config.js看起来像这样:

CKEDITOR.editorConfig = function( config ) {
    config.toolbarGroups = [
        { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
        { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
        { name: 'links' },
        { name: 'insert' },
        { name: 'forms' },
        { name: 'tools' },
        { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
        { name: 'others' },
        '/',
        { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
        { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align', 'bidi' ] },
        { name: 'styles' },
        { name: 'colors' },
        { name: 'about' }
    ];

    config.removeButtons = 'Underline,Subscript,Superscript';

    config.format_tags = 'p;h1;h2;h3;pre';

    config.removeDialogTabs = 'image:advanced;link:advanced';
};

我已从here下载了Wiris插件并将其复制到app/assets/javascripts/ckeditor/plugins

我尝试在config.js文件中添加:

CKEDITOR.editorConfig = function( config )
{
    config.extraPlugins += (config.extraPlugins.length == 0 ? '' : ',') + 'ckeditor_wiris';
    config.toolbar_Full.push({ name: 'wiris', 
    items : [ 'ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS' ]});
};

但似乎没有任何效果。

任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:2)

WIRIS现在可用于Ruby on Rails!你可以在http://www.wiris.com/plugins/demo/ckeditor/ruby/看到CKeditor演示。您将在演示页面上找到下载和文档的链接。 我们的Ruby on Rails插件也可用于TinyMCE和通用HTML编辑器。