tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
214 stars 133 forks source link

Cannot get rid of the BLOATWARE which is found to be pre-compiled in the assets of this gem. #94

Closed netkgk closed 2 years ago

netkgk commented 2 years ago

The bloatware outputs a lot of garbage into the console:

[CKEDITOR] Error code: exportpdf-no-token-url.

Needless to say the exportpdf stuff was neither wanted nor included in the configuration, non-the-less it seems there's no way to get rid of it, except by manually editing pre-uglified assets included in the gem. The bloatware is initialized by ckeditor/build-config.js which is getting unconditionally included in the final build overriding the plugin list from initializer.

tsechingho commented 2 years ago

The exportpdf plugin could be removed, please edit your ckeditor config js, like app/assets/javascripts/ckeditor/config.js.coffee, as following:

CKEDITOR.editorConfig = (config) ->
  config.removePlugins = 'exportpdf'
  true

exportpdf is a premium feature and default enabled in full package of ckeditor this gem used.

I will add related description in README later.