Class: MdSimpleEditorController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- MdSimpleEditorController
- Defined in:
- app/controllers/md_simple_editor_controller.rb
Instance Method Summary collapse
Instance Method Details
#preview ⇒ Object
2 3 4 5 6 |
# File 'app/controllers/md_simple_editor_controller.rb', line 2 def preview = {autolink: true, tables: true, hard_wrap: true, no_intra_emphasis: true, fenced_code:true, gh_blockcode: true} html = Redcarpet::Markdown.new(Redcarpet::Render::HTML, ).render(params['md']).html_safe render text: html end |