Sha256: a0f4e5e4f37b604f9ea54318626f8a3dda90592b3725788e69d15798cbfdb834

Contents?: true

Size: 998 Bytes

Versions: 3

Compression:

Stored size: 998 Bytes

Contents

module SimpleFormMarkdownEditor
  class Configuration
    attr_accessor :buttons
    attr_accessor :extensions
    attr_accessor :help
    attr_accessor :render_class
    attr_accessor :render_options
    attr_accessor :route

    # =====================================================================

    def buttons
      @buttons ||= [
        %w(h1 h2 h3),
        %w(a img),
        %w(strong em code),
        %w(ul ol blockquote hr),
        %w(help)
      ]
    end

    def extensions
      @extensions ||= {
        footnotes: true,
        highlight: true,
        space_after_headers: true,
        strikethrough: true,
        superscript: true
      }
    end

    def help
      @help ||= {
        enabled: true,
        visible: false
      }
    end

    def render_class
      @render_class ||= Redcarpet::Render::HTML
    end

    def render_options
      @render_options ||= {}
    end

    def route
      @route ||= Engine.routes.url_helpers.preview_path
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
simple_form_markdown_editor-0.0.8 lib/simple_form_markdown_editor/configuration.rb
simple_form_markdown_editor-0.0.7 lib/simple_form_markdown_editor/configuration.rb
simple_form_markdown_editor-0.0.6 lib/simple_form_markdown_editor/configuration.rb