You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2008/03/07 11:31:10 UTC

[Trinidad] rendering pre-formatted html text

Hi, I wonder if any component in Trinidad is suitable for rendering a 
pre-formatted chunk of html text.
Assume I allow to edit html through TinyMCE or alike, then I save the 
resulting html text. Whenever I want to render it in readonly mode, I 
need to include it as it is within the page DOM model. I know I can do 
it the dirty way - by playing with js and innerHTML, just I wonder about 
any cleaner - component-oriented solution.
I know about tr:outputFormatted, but this seems very limited in terms of 
supported formatting.

-- Renzo



Re: [Trinidad] rendering pre-formatted html text

Posted by Laurie Harper <la...@holoweb.net>.
Renzo Tomaselli wrote:
> Hi, I wonder if any component in Trinidad is suitable for rendering a 
> pre-formatted chunk of html text.
> Assume I allow to edit html through TinyMCE or alike, then I save the 
> resulting html text. Whenever I want to render it in readonly mode, I 
> need to include it as it is within the page DOM model. I know I can do 
> it the dirty way - by playing with js and innerHTML, just I wonder about 
> any cleaner - component-oriented solution.
> I know about tr:outputFormatted, but this seems very limited in terms of 
> supported formatting.

h:outputText (or tr:outputText) with escape="false" should do the trick.

L.