Structure
{mainTitle} |
{subTitle} |
| importance secondary | importance primary |
importance primary | value placeholder | value placeholder |
importance secondary | value placeholder | value placeholder |
Behavior
Facts are styled by copying the cell that corresponds to the correct (row, column) coordinates and then filling in the content.
The content is treated as HTML and styled accordingly. The styleHint
property allows using CSS to further style the content.
For compatibility reasons certain newline characters are automatically converted to the HTML equivalent, which is <br/>
. These are: \r
, \n
and \u000b
.
Facts are aligned by first looking at its value type. If it is text, it is left aligned, otherwise right. If the fact itself does not define a value type, the column’s value type is applied using the same rules. If no value type is defined the alignment defined in the table style is used.
Examples
Example 1: Showing a simple case without any HTML and CSS
View file |
---|
name | abstract-report-rows_indent.json |
---|
|
View file |
---|
name | output-facts_simple_case.docx |
---|
|
View file |
---|
name | template-facts_simple_case.docx |
---|
|
Example 2: Showing how to use HTML
View file |
---|
name | abstract-report-facts_html.json |
---|
|
View file |
---|
name | output-facts_html.docx |
---|
|
View file |
---|
name | template-facts_html.docx |
---|
|
Example 3: Showing how to use styleHint and CSS styles
View file |
---|
name | template-facts_stylehint_css.docx |
---|
|
View file |
---|
name | abstract-report-facts_stylehint_css.json |
---|
|
View file |
---|
name | output-facts_stylehint_css.docx |
---|
|
Example 4: Showing how newlines are treated
View file |
---|
name | output-facts_newlines.docx |
---|
|
View file |
---|
name | template-facts_newlines.docx |
---|
|
View file |
---|
name | abstract-report-facts_newlines.json |
---|
|
Example 5: Showing how alignment works
View file |
---|
name | template-facts_alignment.docx |
---|
|
View file |
---|
name | abstract-report-facts_alignment.json |
---|
|
View file |
---|
name | output-facts_alignment.docx |
---|
|