How to insert a CKEditor plugin into a Rails 3 application?

I am trying to use the wordcouter plugin for CKEditor. I followed this , but it does not seem to work. Having worked a little bit, I found that there are many different config.js files and numerous plugin directories. Which should i use?

 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 

When I unzip wordcount, it gives me a directory called wordcount_1.05 , should I only rename it to wordcount ?

I enter the following into my config.js files:

 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 }; 

but that doesn't seem to do anything. If I change it a bit (this only works in my application /assets/javascripts/ckeditor/config.js file) to do this:

CKEDITOR.config then my text fields are no longer displayed. Therefore, I feel that this is the right file to change.

Thanks for the help!

+4
source share
2 answers

Put the plugin directories in app / assets / javascripts / ckeditor / plugins / (works for me in Rails 4.)

+3
source

You need to download the Notification plugin http://ckeditor.com/addon/notification

0
source

Source: https://habr.com/ru/post/1483275/


All Articles