diff --git a/app/assets/javascripts/md_simple_editor.js.coffee b/app/assets/javascripts/md_simple_editor.js.coffee index e72f0b4..b1da9ee 100644 --- a/app/assets/javascripts/md_simple_editor.js.coffee +++ b/app/assets/javascripts/md_simple_editor.js.coffee @@ -41,6 +41,10 @@ $ -> else if option == 'md_square' "\n\tjebdhwiedwef Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut aliquet velit. Nam fermentum, mi quis egestas ornare, massa velit pharetra ante, sed pellentesque tortor nisl non quam. Nunc eget egestas orci.\n\n
" + else if option == 'md_link' + "\n[This is a link](http://google.com)\n" + else if option == 'md_camera-retro' + "\n![Alt](https://www.google.com.co/images/srpr/logo11w.png)\n" textarea = $('#md-editor #md-text textarea') insertAtCaret(textarea.attr('id'), text) diff --git a/app/helpers/md_simple_editor/rails/md_helper.rb b/app/helpers/md_simple_editor/rails/md_helper.rb index ed11319..22f6556 100644 --- a/app/helpers/md_simple_editor/rails/md_helper.rb +++ b/app/helpers/md_simple_editor/rails/md_helper.rb @@ -49,6 +49,14 @@ def md_simple_editor button_tag(:type => 'button', :class => "btn btn-default md_minus", :style => "font-size: 11px") do fa_icon "minus" end + end + + content_tag(:div, :id => "btn-group") do + button_tag(:type => 'button', :class => "btn btn-default md_link", :style => "font-size: 11px") do + fa_icon "link" + end + + button_tag(:type => 'button', :class => "btn btn-default md_camera-retro", :style => "font-size: 11px") do + fa_icon "camera-retro" + end end end + content_tag(:div, :id => "md-text") do