Skip to content

Instantly share code, notes, and snippets.

  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save zaemiel/40f7a8dfe1e54e7217c4 to your computer and use it in GitHub Desktop.
CKEditor installation and integration with Active Admin
1. Gemfile
gem 'ckeditor', github: 'galetahub/ckeditor'
2. bundle install
3. app/assets/javascripts/application.js
//= require ckeditor/init
4. config/initializers/active_admin.rb
config.register_javascript 'ckeditor/init.js'
5. Usage with Active Admin:
app/admin/model.rb
form do |f|
f.input :description, as: :ckeditor
end
Links:
https://github.com/galetahub/ckeditor
https://github.com/activeadmin/activeadmin/wiki/Ckeditor-integration
@jackie-do
Copy link

this config doesn't work with rails 5.2.2, ckeditor 5.0.0 and activeadmin 1.4.3

@rmalkevy
Copy link

rmalkevy commented May 3, 2019

@jackiedo91 Did you solve your problem? Maybe you have your own solution?

@thanhtoan1196
Copy link

@jackiedo91 @rmalkevy I use version 4.2.4 and it worked fine
gem 'ckeditor', '4.2.4'

P/S: if using 4.3.0 will get this error galetahub/ckeditor#829

@AssemDeghady
Copy link

this config doesn't work with rails 5.2.2, ckeditor 5.0.0 and activeadmin 1.4.3

+1
i reverted to 4.2.4 as @thanhtoan1196 did

@csillaandras
Copy link

this config doesn't work with rails 5.2.2, ckeditor 5.0.0 and activeadmin 1.4.3

try with config instead of init, i mean:
//= require ckeditor/config
and
config.register_javascript 'ckeditor/config.js'

@z-4444
Copy link

z-4444 commented Oct 7, 2022

@csillaandras
//= require ckeditor/config
and
config.register_javascript 'ckeditor/config.js'
solve issue but an other error occur
Uncaught ReferenceError: CKEDITOR is not defined

Screenshot from 2022-10-07 12-40-13

@z-4444
Copy link

z-4444 commented Oct 7, 2022

Uncaught ReferenceError: CKEDITOR is not defined
solved by adding
config.register_javascript "//cdn.ckeditor.com/4.5.6/full/ckeditor.js"
in config/initializers/active_admin.rb

@gajendra123-apple
Copy link

editor is not colourful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment