2015-01-05 79 views
2

我有一個與CKEditor集成的Rails應用程序。如何添加Wiris插件到CKEditor?

我沒有能夠在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

我們目前正在開發一個Ruby on Rails專用插件,它將在幾周內推出。我們會再次在這裏發佈,讓你知道。 –

回答

2

WIRIS現在可用於Ruby on Rails!您可以在http://www.wiris.com/plugins/demo/ckeditor/ruby/處看到CKeditor演示。您將在演示頁面上找到指向下載和文檔的鏈接。 我們的Ruby on Rails插件也可用於TinyMCE和通用HTML編輯器。

+0

這是編輯器的PHP或紅寶石,在這裏你被提到紅寶石,但點擊該網址後,其重定向到PHP。 – VtrKanna

+0

您可以從http://www.wiris.com/en/plugins/ckeditor/download下載Ruby插件。您也可以從http://www.wiris.com/plugins/docs/demo-download下載演示。 –

+0

我得到這個錯誤: - ActionController :: RoutingError(沒有路由匹配[GET]「/assets/generic_wiris/tests/generic_demo.html」): – VtrKanna

相關問題