Keeping HTML formatting

LCON posted this 19 March 2015


I want to insert text in a word document while keeping its HTML formatting. For example, I want <b> Marie </b> to appear in bold letters in the resulting Word document. Is it possible ? How can I do that ?


Last edited 19 March 2015

4 Posts
4 Points
Order By: Standard | Newest | Votes
jles posted this 19 March 2015


Yes it is possible to insert HTML into a document. You must not use a FIELD element, which is a single value (text/number/date), but instead you must use a SUB DOCUMENT tagging element - HTML is in Docentric Toolkit treated as a (sub) document. All you have to do is place a SUB DOCUMENT element on to a template, set its format property to HTML (currently only HTML and Word sub documents are supported) and data bind it to a property that holds binary data representing a HTML fragment/document.

Note that support for HTML is currently limited to only basic inline styles. CSS styles are not supported and there is limited support for tables. We will add a much more rich support for HTML later this year.

Anyway if your HTML is limited to bold, italic, font and color, then the current HTML support will suffice. Is this the case with your scenario? Please let me understand what are your requirements.

If you haven't downloaded the trial version yet, I suggest you to do so. The product setup also installs the "Example Browser" application that you can use to run various examples while also changing the example templates. There is also one example showing how to insert an HTML fragment. You will be able to learn how the SUB DOCUMENT tagging element is utilized and see what source code is needed to achieve the results.

Thanks, Jure Leskovec

121 Posts
248 Points
LCON posted this 20 March 2015

Thanks a lot for you for your answer !

I think a sub document will suffice


4 Posts
4 Points

Our 38009 members have posted 275 times in 82 discussions