using tailwind simple form builder

This commit is contained in:
2022-12-25 23:32:34 +02:00
parent 946f7625be
commit b0680404d3
10 changed files with 254 additions and 26 deletions

View File

@ -1,9 +1,23 @@
require "redcarpet"
module ApplicationHelper
def markdown(text)
Merged::MergedHelper.markdown(text)
def renderer
options = {hard_wrap: true , autolink: true, no_intra_emphasis: true ,
safe_links_only: true, no_styles: true ,
link_attributes: { target: '_blank' }}
html = Redcarpet::Render::HTML.new(options)
Redcarpet::Markdown.new(html, options)
end
def markdown(text)
text = text.text unless text.is_a?(String)
return "" if text.blank?
self.renderer.render(text).html_safe
end
def main_app
Rails.application.routes.url_helpers
end
end