Sha256: 9ad244ed4e0b1ec4a889d8a0e291f4d4fc14789819507f2b4352be60363aa0bc
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
- if ['string', 'integer', 'phone', 'email', 'address', 'url', 'domain'].include?(@object.type) = form.text_field :raw, :value => field.value - if @object.type == 'color' = form.text_field :raw, :value => field.value, 'data-color' => true, style: "background-color: ##{field.value}" - elsif @object.type == 'text' || @object.type == 'yaml' = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80 - elsif @object.type == 'html' - if form.respond_to?(:cktext_area) = javascript_include_tag "ckeditor/init" = form.cktext_area :raw, :value => field.value, :rows => 10, :cols => 80 - elsif Object.const_defined?('Rich') = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80 = javascript_include_tag "rich/base.js" :javascript var instance = CKEDITOR.instances['#{form.dom_id(field)}']; if(instance) { CKEDITOR.remove(instance); } CKEDITOR.replace('#{form.dom_id(field)}', #{Rich.options().to_json.html_safe}); - else .alert.alert-error = t('admin.settings.no_ckeditor_detected') = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
Version data entries
4 entries across 4 versions & 1 rubygems