Skip to content

Commit

Permalink
Image and Link options
Browse files Browse the repository at this point in the history
  • Loading branch information
rderoldan1 committed Feb 10, 2014
1 parent 22cb604 commit 4981c84
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/md_simple_editor.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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<br> "
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)
Expand Down
8 changes: 8 additions & 0 deletions app/helpers/md_simple_editor/rails/md_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4981c84

Please sign in to comment.