Grails Markdown Plugin 0.1 Released

| Comments

I’ve just released a quick plugin that I put together tonight to help render markdown text as HTML within a grails application. It leverages the MarkdownJ library.

I’m a big fan of storing information in markdown format as it is easy to read, easy to write, and easy to transform. A number of big websites like support the entry and display of markdown text to help people format their questions and answers without having to remember to properly format HTML.

If you’re unfamiliar with Markdown there are a number of good references on it’s use.

The grails markdown plugin is a very basic plugin. Currently, it just wraps the markdown libarary with a single TagLib that lets you easily render html from a markdown string within your gsp pages.

To install it, just type:

grails install-plugin markdown

To use it in your gsp file:

The *four* cardinal directions are

- North
- South
- East
- West

renders the html:

The four cardinal directions are

  • North
  • South
  • East
  • West

Or you can use the “text” attribute of the taglib:

See the Grails Markdown Wiki and source for more details.