Sha256: 4a2cc1e125606f5d16eba39ed4402bd344f497ef79465ded2922cc803685f1f7
Contents?: true
Size: 666 Bytes
Versions: 10
Compression:
Stored size: 666 Bytes
Contents
# frozen_string_literal: true require "redcarpet" module Decidim module DecidimAwesome module ContentRenderers # A renderer that processes markdown class MarkdownRenderer < Decidim::ContentRenderers::BaseRenderer # @return [String] the content ready to display (contains HTML) def render(options = { 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, options).render(content) "<div class=\"awesome-markdown-editor\">#{md}</div>" end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems