0

If I do

listitem.setLabel("<p>HTML code</p>");

I get an escaped version of it. But how can I render HTML using setLabel (or maybe some other method to display content) instead of having it escaped?

Overriding setLabel doesn't help as it's only a delegator method and the actual content parsing happens some levels below.

Alex
  • 8,245
  • 8
  • 46
  • 55

1 Answers1

2

You can't do this by setLabel(...) but by adding a
Listcell and Html Component

Listcell c = new Listcell();
Html h = new Html();
h.setContent("MY HTML STRING HERE");
c.appendChild(h);
listitem.appendChild(c);
quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
Nabil A.
  • 3,270
  • 17
  • 29