Module: MdSimpleEditor::Rails::MdHelper

Defined in:
app/helpers/md_simple_editor/rails/md_helper.rb

Instance Method Summary collapse

Instance Method Details

#md_simple_editorObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'app/helpers/md_simple_editor/rails/md_helper.rb', line 4

def md_simple_editor
  (:div, :id => "md-editor") do
    (:div, :id => "md-toolbar") do
      (:div, :id => "btn-group") do
        button_tag(:type => 'button', :class => "btn btn-default md_h1", :style => "font-size: 15px") do
          (:strong, 'H1')
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_h2", :style => "font-size: 13px") do
          (:strong, 'H2')
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_h3", :style => "font-size: 11px") do
          (:strong, 'H3')
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_h4", :style => "font-size: 9px") do
          (:strong, 'H4')
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_h5", :style => "font-size: 7px") do
          (:strong, 'H5')
        end
      end +
      (:div, :id => "btn-group") do
        button_tag(:type => 'button', :class => "btn btn-default md_italic", :style => "font-size: 11px") do
          fa_icon "italic"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_bold", :style => "font-size: 11px") do
          fa_icon "bold"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_list-ul", :style => "font-size: 11px") do
          fa_icon "list-ul"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_list-ol", :style => "font-size: 11px") do
          fa_icon "list-ol"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_indent", :style => "font-size: 11px") do
          fa_icon "indent"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_underline", :style => "font-size: 11px") do
          fa_icon "underline"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_table", :style => "font-size: 11px") do
          fa_icon "table"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_square", :style => "font-size: 11px") do
          fa_icon "square"
        end +
        button_tag(:type => 'button', :class => "btn btn-default md_minus", :style => "font-size: 11px") do
          fa_icon "minus"
        end
      end
    end +
    (:div, :id => "md-text") do
      yield
    end +
    (:div, :id => "md-preview") do

    end
  end
end