Class: Decidim::DecidimAwesome::ContentRenderers::MarkdownRenderer
- Inherits:
-
ContentRenderers::BaseRenderer
- Object
- ContentRenderers::BaseRenderer
- Decidim::DecidimAwesome::ContentRenderers::MarkdownRenderer
- Defined in:
- lib/decidim/decidim_awesome/content_renderers/markdown_renderer.rb
Overview
A renderer that processes markdown
Instance Method Summary collapse
-
#render(options = { filter_html: true, autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, disable_indented_code_blocks: true, tables: true }) ⇒ String
The content ready to display (contains HTML).
Instance Method Details
#render(options = { filter_html: true, autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, disable_indented_code_blocks: true, tables: true }) ⇒ String
11 12 13 14 |
# File 'lib/decidim/decidim_awesome/content_renderers/markdown_renderer.rb', line 11 def render( = { filter_html: true, autolink: true, no_intra_emphasis: true, fenced_code_blocks: true, disable_indented_code_blocks: true, tables: true }) md = Redcarpet::Markdown.new(Redcarpet::Render::HTML, ).render(content) "<div class=\"awesome-markdown-editor\">#{md}</div>" end |