try myInlineHtml.getwidget();
it return the HTML "widget".. probably with <div> tags but without all the
<table> structure

Ex:
VerticalPanel mainPanel = new VerticalPanel();

RootPanel.get().add(mainPanel);

mainPanel.add(new HTML("<b>Hello</b>"));

System.out.println(mainPanel.getWidget(0));

output-> <div class="gwt-HTML"><b>Hello</b></div>

after that you can do an easy function that cuts off the <div> tags..


On Mon, Apr 7, 2014 at 8:43 AM, Tom <henry...@gmail.com> wrote:

> myInlineHtml.getText() only return the text, it won't take the html tag.
>
> Ex: myInlineHtml.setHTML("<b>test</b>);
> myInlineHtml.getHTML(); will return "test" without <b> tags.
>
>
> On Monday, April 7, 2014 1:35:50 AM UTC+10, Tom wrote:
>>
>> Also, Does this happen independently from browsers or dependently from
>> browsers? cos that is serious.
>> So getHTML return value based on the Browser or based on the Gwt
>> mechanism?
>>
>> On Monday, April 7, 2014 1:24:42 AM UTC+10, Tom wrote:
>>>
>>> I don't understand how Gwt setHTML & getHTML work. It doesn't seem to
>>> be consistent.
>>>
>>> Let see this example:
>>>
>>> myInlineHtml.setHTML(SafeHtmlUtils.fromSafeConstant("<table><tr><td>Test</td></tr></table>"));
>>> System.out.println(myInlineHtml.getHTML());
>>>
>>> Output: "<table><tbody><tr><td>Test</td></tr></tbody></table>"
>>>
>>> Clearly when we set the html for myInlineHtml we don't have
>>> <tbody></tbody>, but when we getHTML from myInlineHtml then Gwt include
>>> <tbody></tbody>.
>>>
>>> Why that's happen cos it can cause the confused when you want to get
>>> Html value & u thought it has the same value I the time we set it but it
>>> hasn't?
>>>
>>>
>>> also:  http://stackoverflow.com/questions/22895956/why-
>>> sethtmltabletr-tr-table-but-then-gethtml-return-tablet
>>>
>>  --
> 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+unsubscr...@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.
>

-- 
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+unsubscr...@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.

Reply via email to