Design

HTML

How to render HTML content in your document?
ENTERPRISE FEATURE Available for:
Carbone Cloud
Carbone On-premise
Embedded Carbone JS
  v5.0+ 

:html

Compatible with ODT, DOCX and PDF files.

It is possible to render the following tags: <br>, <b>, <strong>, <i>, <em>, <u>, <s>, <p>, <a href="URL">, <ol>, <ul>, <li>, <del> and <img>. Unsupported tags, attributes and styles are skipped and not rendered for now.

Options Available:

Important Notes:

HTML Example 1

data
{
  "name" : "<b>raptor</b>",
  "description" : "The engine is <u>powered</u> by <i>cryogenic liquid methane</i><br>and<br><b><i>liquid oxygen</i></b> (LOX),<br><s>rather than the RP-1 kerosene and LOX</s>."
}
template
{d.name:html}
{d.description:html}
Carbone Merge Icon
result
raptor
The engine is powered by cryogenic liquid methane
and
liquid oxygen (LOX),
rather than the RP-1 kerosene and LOX.

HTML Example 2

The :html formatter creates new paragraph.

data
{
  "name" : 'Banana',
  "description" : '<b>is an elongated, edible fruit</b>'
}
template
The famous fruit {d.name} {d.description:html}, botanically a berry.
Carbone Merge Icon
result
The famous fruit Banana
is an elongated, edible fruit
, botanically a berry.

HTML Nospace Example

data
{
  "name" : 'Banana',
  "description" : '<b>is an elongated, edible fruit</b>'
}
template
The famous fruit {d.name} {d.description:html(nospace)}, botanically a berry.
Carbone Merge Icon
result
The famous fruit Banana
is an elongated, edible fruit
, botanically a berry.

HTML Inline Example

data
{
  "value" : "<b>The text is injected within the current paragraph</b>",
}
template
After
Beginning - {d.value:html(inline)} - End
Before
Carbone Merge Icon
result
After
Beginning - The text is injected within the current paragraph - End
Before