Project

General

Profile

Adding HTML markup from code

Added by max p about 4 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)

RE: Adding HTML markup from code - Added by Roel Standaert about 4 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)