Renders text as markdown in the index view.
You just need to use markdown_column
method.
index do
markdown_column :description
end
Renders text as markdown in the show view.
You just need to use markdown_row
method.
show do
attributes_table do
markdown_row :description
end
end
This builder uses Redcarpet to render the text. You can pass any Redcarpet options to it. Using the options extensions
and render_options
to modify existing Redcarpet options.
index do
markdown_column :description, extensions: { footnotes: true }
end
index do
markdown_column :description, render_options: { hard_wrap: true }
end
The builder enables the following options by default to provide a plug-and-play experience:
fenced_code_blocks: true
no_intra_emphasis: true
strikethrough: true
superscript: true
filter_html: true,
hard_wrap: true