Friday, March 28, 2014

Re: Only subset of HTML supported by HTML class?

Thanks.  That was helpful.  I checked through Chrome Developer Tools.  The HTML is correctly getting to the browser.  Turns out GXT's reset.css neutralizes much of HTML.  Presumably this is done for a reason and I can't just get rid of it.  Working around it is beyond me at the moment.

Thanks!

Blake

On Fri, Mar 28, 2014 at 4:05 AM, Nicolas Weeger <nicolas@nekoko.fr> wrote:
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

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment