Software Development

Saturday, February 14, 2009

When using FCKEditor plugin with Grails (http://grails.org/FCKeditor+plugin), need to use .decodeHTML() for the value that you want to display as in the edit.gsp and show.gsp, else it will be shown as HTML-safe codes which is not what you want.

edit.gsp

<fckeditor:editor
name="description"
width="100%"
height="400"
toolbar="Standard"
fileBrowser="default">
${fieldValue(bean:eventInstance, field:'description').decodeHTML()}
</fckeditor:editor>

show.gsp


${fieldValue(bean:eventInstance, field:'description').decodeHTML()}

create.gsp

<fckeditor:editor
name="description"
width="100%"
height="400"
toolbar="Standard"
fileBrowser="default">
${fieldValue(bean:eventInstance, field:'description')}
</fckeditor:editor>

0 Comments:

Post a Comment

<< Home