Integrate Markdown plugin in Grail

Posted By : Deepak Gupta | 23-May-2014

Integrate Markdown plugin in Grail

Hi guys , here I am going to share knowledge that how to use Markdown language in grails with plugins

First of all Intall plugins for markdown For this just put below line in buildconfig.groovy file compile ":markdown:1.1.1"

Way to use markdown language

1. By using tag of grails

 I  *test*  markdown.

 

2. By using text attribute of grails tag


 

3. By using template attribute


 

4. String class extension we have two method in string class

a. markdownToHtml()
b. htmlToMarkdown()

 

5. Service method

def markdownService
markdownService.markdown(“helloo”)

 

6. Config parameter

markdown(text, [config])
this file convert markdown to html config parameter have taken form config file
In config file
configure markdown as 
markdown.all = true           // Configuration
[all: true] 

 

About Author

Author Image
Deepak Gupta

Deepak is a bright Groovy and Grails developer

Request for Proposal

Name is required

Comment is required

Sending message..