Skip to content
Looking for every option?See the full API reference →

EasyMDE ​

The easy_mde field provides an EasyMDE Markdown editor for a text column in your database. Use it to write descriptions, notes, or other long-form content and store the raw Markdown rather than HTML.

ruby
# app/avo/resources/post.rb
field :description, as: :easy_mde

By default, the spell checker is off, long content is collapsed on the Show view, and the field is hidden from the Index view.

INFO

Before Avo 3.17 this field was called markdown. It was renamed to easy_mde to make room for Avo's own markdown implementation.

An Avo create-form card containing an easy_mde field: the EasyMDE Markdown editor with its toolbar (bold, italic, heading, lists, link and preview controls) above a text area pre-filled with sample Markdown — a Release notes document with a heading, bold text, a bullet list and a link.

Enable spell checking ​

If you want spelling suggestions while editing, set spell_checker to true.

ruby
# app/avo/resources/post.rb
field :description, as: :easy_mde, spell_checker: true

Display the full content on Show ​

Readers can expand long content with More content and collapse it again with Less content. If you want the full content visible immediately, set always_show to true.

ruby
# app/avo/resources/post.rb
field :description, as: :easy_mde, always_show: true

The Show view displays a read-only editor without the toolbar or status bar.

Adjust the editor height ​

Drag the resize handle on New and Edit forms to change the editor height.

WARNING

The height option does not currently set the editor's initial height. Use the resize handle instead.

Use common field options ​

See Common field options for shared settings such as labels, help text, placeholders, and visibility.