Fix documentation for "Install additional plugins" (v5+). Codemirror example.
rgalea opened this issue · comments
Rupert G commented
Thank you for creating and supporting this gem.
The documentation under "Install additional plugins" is not correct. I am specifically talking about trying to add a plugin not supported by the CDN (in my case codemirror). If I just add a config.extraPlugins
line to the config ckeditor.js will try and pull the assets from the CDN which will result in a 404.
My solution was:
- Add the plugin assets under /public/ckeditor/plugins/
- Add
CKEDITOR.plugins.addExternal( 'codemirror', '/ckeditor/plugins/codemirror/' );
to the config.js file - Then add
config.extraPlugins = 'codemirror,';
to the config.js file
Alessandro Rodi commented
What I did:
- Add the plugin assets under /assets/javascripts/ckeditor/plugins/
CKEDITOR.plugins.addExternal('youtube', '<%=asset_path 'ckeditor/plugins/youtube/plugin.js'%>');
to the head of the html page- Add to
assets.rb
Rails.application.config.assets.precompile += ['ckeditor/plugins/youtube/plugin.js']
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.