railsadminteam/rails_admin

View on GitHub
app/views/rails_admin/main/_form_ck_editor.html.erb

Summary

Maintainability
Test Coverage
<%
  js_data = {
    jspath: field.location ? field.location : field.base_location + "ckeditor.js",
    base_location: field.base_location,
    options: {
      customConfig: field.config_js ? field.config_js : field.base_location + "config.js"
    }
  }
%>
<%= form.text_area field.method_name, field.html_attributes.reverse_merge(data: { richtext: 'ckeditor', options: js_data.to_json }).reverse_merge({ value: field.form_value }) %>