svaens
svaens

Reputation: 649

How to set the content of a g:textArea as HTML (formatted text, not code) in grails

I have a small grails app which I am in the middle of writing.

In one action, the show, the 'show.gsp' page is called, in which is a text area:

As shown in 'value', the value is to be some formatted text (i.e., HTML) such as:

<p>Writing some html </p>
<p>we can <strong>bold</strong> it</p>
<p>and <em>italic</em> it</p>
<p>and send it!</p>
<p>sean</p>
<p> </p>

However, instead of showing up as:

Writing some html 

we can bold it

and italic it

and send it!

sean

 


the HTML is shown as code (I assume the html is being escaped, even though i've set the attribute escapeHtml="false".

Or, do I have it wrong? How else can I insert the HTML into a textArea as formatted text?

Thanks!

sean

Upvotes: 0

Views: 521

Answers (1)

Sergei Shushkevich
Sergei Shushkevich

Reputation: 1376

With textarea you can't. Try to use WYSIWYG editors like CKEditor

Upvotes: 1

Related Questions