Sha256: 58a1495190045639352a6a6c9f82583763cecec6c6cb5b870778ba54fb684432

Contents?: true

Size: 617 Bytes

Versions: 1

Compression:

Stored size: 617 Bytes

Contents

:ruby
  url = (ENV['RAILS_URL'].blank? || ENV['RAILS_RELATIVE_URL_ROOT'].blank?) ? "http://localhost:3000/assets/ckeditor" : "#{ENV['RAILS_URL']}#{ENV['RAILS_RELATIVE_URL_ROOT']}/assets/ckeditor"
  js_data = {
    jspath: field.location ? field.location : url + field.base_location + "ckeditor.js",
    base_location: url,
    options: {
      customConfig: field.config_js ? field.config_js : url + 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 })

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_admin_ui_layout_taris-1.2.26 app/views/rails_admin/main/_form_ck_editor.html.haml