Skip to content
A Grails plugin that adds Markdown support to the decorator plugin
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Markdown Decorator - Grails Plugin

This plugin adds Markdown support to the decorator plugin. The decorator plugin uses pluggable decorators to modify markup in GSP pages. The standard decorator can convert URLs to clickable hyperlinks. This plugin extends the decorator plugin and adds support for markdown syntax in parts of GSP pages.


// The model
text = "This plugin is **awesome!**"

// GSP markup

Produces the following HTML:

<p>This plugin is <strong>awesome!</strong></p>

which renders:

This plugin is awesome!

You can use this plugin in your Grails application to allow your users to add markdown syntax to user profiles, comments, etc.

The source code for this decorator is very simple. It uses the MarkdownJ library:

class MarkdownDecorator {

    String decorate(String text, Map params) {
        new MarkdownProcessor().markdown(text).trim()
Something went wrong with that request. Please try again.