I needed to add codesnippet plugin for source code syntax highlighting in ckeditor. This was to edit blog articles, and it was built in rails.
Ok so, I google searched the solution for installing the plugin and even tried reading the source code and understanding how it worked. Luckly, I found the solution in one of the issues pointed by google. I have summarized the solution for you.
- Add the plugin assets in to the asset compilation tree, by adding the following in config/initializers/ckeditor.rb
- [Optional] Depending on the plugin you are installing you might need to modify the configs for ckeditor. There is a default config file is added by the ckeditor gem. You can refer to this page for more info.
For reference, you can study the following link: https://github.com/galetahub/ckeditor/issues/450