Sha256: 1841f963f47a42fe019aee204001c6b815d605c15ecc7a30eea7886cab0fd51f

Contents?: true

Size: 1.09 KB

Versions: 12

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

require 'rails_admin/config/fields/types/text'

module RailsAdmin
  module Config
    module Fields
      module Types
        class SimpleMDE < Text
          # Register field type for the type loader
          RailsAdmin::Config::Fields::Types.register(self)

          # If you want to have a different SimpleMDE config for each instance
          # you can override this option with these values: https://github.com/sparksuite/simplemde-markdown-editor#configuration
          register_instance_option :instance_config do
            nil
          end

          register_instance_option :version do
            '1.11.2'
          end

          register_instance_option :js_location do
            "https://cdnjs.cloudflare.com/ajax/libs/simplemde/#{version}/simplemde.min.js"
          end

          register_instance_option :css_location do
            "https://cdnjs.cloudflare.com/ajax/libs/simplemde/#{version}/simplemde.min.css"
          end

          register_instance_option :partial do
            :form_simple_mde
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails_admin-3.2.1 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.2.0 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.2.0.rc lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.2.0.beta lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.4 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.3 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.2 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.1 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.0 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.0.rc2 lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.0.rc lib/rails_admin/config/fields/types/simple_mde.rb
rails_admin-3.1.0.beta lib/rails_admin/config/fields/types/simple_mde.rb