Friday, March 28, 2014

Re: Only subset of HTML supported by HTML class?

Hello.


Using GWT 2.5.0, I just tried that:


final VerticalPanel panel = new VerticalPanel();
panel.add(new HTML("abcde <strong>hello</strong>
<em>emphisized</em>the<br>break <b>bold
text</b><ol><li>aaaaa</li><li>bbbbbb</li></ol>",true));


and it renders as expected.


Can you check using eg Firebug or some developers tools whether the <em> tag
is actually present? Is there any chance you have a CSS which resets em/strong
without giving a font-weight or font-style thus leading you to think they
don't work?


Hope this helps


Kind regards


Nicolas



Le vendredi 28 mars 2014 02:02:45, Blake McBride a écrit :
> Greetings,
>
> I am trying to render some HTML. I am using:
>
> RootLayoutPanel rlp = RootLayoutPanel.get();
> rlp.clear();
> rlp.add(new HTML("abcde <strong>hello</strong> <em>emphisized</em>
> the<br>break <b>bold text</b><ol><li>aaaaa</li><li>bbbbbb</li></ol>",
> true));
>
>
> The <b> and <br> work. All the rest is ignored. Why is only a subset
> supported? I don't understand why it wouldn't just insert what I specify.
> Is there a way for me to add arbitrary html?
>
> Thanks.
>
> Blake

No comments:

Post a Comment