首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将Wiris插件添加到CKEditor中?

如何将Wiris插件添加到CKEditor中?
EN

Stack Overflow用户
提问于 2015-01-05 04:52:44
回答 1查看 1.7K关注 0票数 3

我有一个带有CKEditor集成的Rails应用程序。

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

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

代码语言:javascript
复制
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';
};

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

我尝试在config.js文件中添加以下内容:

代码语言:javascript
复制
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' ]});
};

但似乎什么都没起作用。

任何帮助都将不胜感激!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-02-05 17:57:59

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27773616

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档