Clone wiki

grails-markdown / Home

Grails Markdown Plugin

This is a quick plugin that leverages MarkdownJ to provide markdown taglib support within grails.

Markdown is simple, human readable, lightly formatted text that is easy to transform into HTML. It's great for rendering text that humans type into entry boxes to the screen.


Easy! In the root of your grails app, just execute:

grails install-plugin markdown


The plugin currently provides a single taglib, markdown:renderHtml. It will transform a string of markdown into HTML either through the body of the tag:

The *four* cardinal directions are

- North
- South
- East
- West

renders the html:

<p>The <em>four</em> cardinal directions are</p>

Or through the "text" attribute:

<markdown:renderHtml text="${post.body}"/>

The plugin also adds a method to string to transform it from markdown to html:

    assert "<p>rain in spain</p>\n" == "rain in spain".markdownToHtml()


  • 0.1 - Initial version with markdown taglib
  • 0.2 - Addition of patch from @dani_latorre adding markdownToHtml() method to String and MarkdownService