Explicitly disable not used ckeditor plugins

All of these plugins are not used anywhere.

Change introduced at ckeditor initializer will ommit unneeded
precompilation of plugins assets on production environments.

Change introduced at ckeditor config file adresses the problem with assets
pipeline fallback on testing environments described here: #2711. Now plugins
that are explicitly disabled will not be precomiled when running ckeditor
javascript enabled feature specs.
This commit is contained in:
Senén Rodero Rodríguez
2020-04-21 11:47:08 +02:00
parent b2d64b20ed
commit 9fd9ef8a54
2 changed files with 4 additions and 2 deletions

View File

@@ -14,6 +14,8 @@ CKEDITOR.editorConfig = function( config )
config.allowedContent = true;
config.format_tags = "p;h2;h3";
config.removePlugins = "balloonpanel,balloontoolbar,copyformatting,scayt,wsc";
// Rails CSRF token
config.filebrowserParams = function(){
var csrf_token, csrf_param, meta,

View File

@@ -8,7 +8,7 @@ Ckeditor.setup do |config|
config.authorize_with :cancan
config.assets_languages = Rails.application.config.i18n.available_locales.map { |l| l.to_s.downcase }
config.assets_plugins = %w[balloonpanel balloontoolbar copyformatting image
link magicline pastefromword scayt table tableselection wsc]
config.assets_plugins = %w[image link magicline pastefromword
table tableselection]
config.assets.reject! { |asset| asset =~ /\Ackeditor\/samples\// }
end