Clone this wiki locally
You can configure more options of CKEditor "config.js" file following the Api Documentation .
RailsAdmin.config do |config| config.model Team do edit do # For RailsAdmin >= 0.5.0 field :description, :ck_editor # For RailsAdmin < 0.5.0 # field :description do # ckeditor true # end end end end
Although ckeditor is loaded in modal windows (e.g. twb), by default changes are not saved by submitting the modal. This is because the underlying textarea gets not updated before the ajax post request is issued. To prevent this you can use the following code:
$(document).ready -> $(document).on 'mousedown', '.save-action', (e) -> # triggers also when submitting form with enter for instance of CKEDITOR.instances editor = CKEDITOR.instances[instance] if editor.checkDirty() editor.updateElement(); return true;
//= require rails_admin/custom/ckeditor_ajax