Project

General

Profile

MPAdding HTML markup from code

Added by max p almost 6 years ago

Hi,

is there a way to add raw html markup, for example:

auto* c = root()->addNewWt::WContainerWidget();
c->addNewWt::WText("some text");

c->addHtml("

here goes some raw html markup

");// hypothetical function

Kind regards,
Max.


Replies (2)

RS RE: Adding HTML markup from code - Added by Roel Standaert almost 6 years ago

Yes, you can either add a WText with TextFormat::XHTML (the default, does XML parsing and filtering) or TextFormat::UnsafeXHTML (no filtering).

You could also use WTemplate.

    (1-2/2)