[英]How to insert a CKEditor plugin in a Rails 3 app?
我正在嘗試為CKEditor使用wordcouter插件。 我跟着這個 ,但似乎沒有用。 經過一番探索后,我發現有很多不同的config.js
文件和眾多的plugin
目錄。 我應該使用哪一個?
app/assets/ckeditor/plugins/
app/assets/ckeditor/_source/plugins/
app/assets/javascripts/ckeditor/plugins/
app/assets/javascripts/ckeditor/_source/plugins/
app/assets/javascripts/ckeditor/_source/core/plugins.js
app/assets/ckeditor/_source/core/plugins.js
當我解壓wordcount時,它給了我一個名為wordcount_1.05
的目錄,我應該將它重命名為wordcount
嗎?
我在config.js
文件中鍵入以下內容:
config.extraPlugins = 'wordcount';
config.wordcount = {
// Whether or not you want to show the Word Count
showWordCount: true,
// Whether or not you want to show the Char Count
showCharCount: false
};
但這似乎根本沒有做任何事情。 如果我稍微修改它(這只適用於我的app / assets / javascripts / ckeditor / config.js文件)來實現它:
CKEDITOR.config
然后我的文本框完全停止顯示。 所以我覺得這是要修改的正確文件。
謝謝您的幫助!
將插件目錄放在app / assets / javascripts / ckeditor / plugins /中(在Rails 4中為我工作)
您需要從http://ckeditor.com/addon/notification下載Notification插件
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.