You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by tubin gen <fa...@gmail.com> on 2009/04/22 18:24:59 UTC

html text as model

I have text area   with tinynmce behaviour, so any text  saved from this
textarea will contain html tags to retain format of the text.Now in other
pages I want to display this text as read-only  , for which i get the string
comment text from database and set it to as  model to my  label ,  the
problem is the comment text its getting displayed  as it is showing html
tags and browser is not parsing them ,

for example

add(new Label("comments",new Model<String>(<p>TinyMCE is a platform
independent web </p>));

> once the page is rendered   I am expecting to see  this as  *TinyMCE is a
> platform independent web*  and not   *<p>TinyMCE is a platform independent
> web </p>  , *

please tell me how to  resolve this.

Re: html text as model

Posted by Jeremy Thomerson <je...@wickettraining.com>.
On your label: setEscapeModelStrings(false)

--
Jeremy Thomerson
http://www.wickettraining.com



On Wed, Apr 22, 2009 at 11:24 AM, tubin gen <fa...@gmail.com> wrote:

> I have text area   with tinynmce behaviour, so any text  saved from this
> textarea will contain html tags to retain format of the text.Now in other
> pages I want to display this text as read-only  , for which i get the
> string
> comment text from database and set it to as  model to my  label ,  the
> problem is the comment text its getting displayed  as it is showing html
> tags and browser is not parsing them ,
>
> for example
>
> add(new Label("comments",new Model<String>(<p>TinyMCE is a platform
> independent web </p>));
>
> > once the page is rendered   I am expecting to see  this as  *TinyMCE is a
> > platform independent web*  and not   *<p>TinyMCE is a platform
> independent
> > web </p>  , *
>
> please tell me how to  resolve this.
>