Native Feature
ContactsLaw supports a number of native features that can be included in Markdown to influence generated documents. This is particularly useful in fragments and e-mail templates, where the body must be in Markdown format (even though the final document may be in some other format).
Whenever native features are included, there is always a fallback that is inserted in case a different format is used (or when testing the template).
Supported Features
Below is a list of the native features that are supported for each document format:
Microsoft Word Document (.docx
)
Tab
Markdown automatically collapses excess whitespace, including tab characters. When generating a Word document, you may want to preserve tabs; e.g. to align with existing tab stops in the document.
In the Desktop App, tabs are automatically converted to the corresponding native feature. In other situations, you will need to manually include the following whenever you want to add a tab space in Word:
!!(.docx Tab)[ ]
Style
Markdown allows a limited set of paragraph and heading styles, which are sufficient for most purposes. When tables are inserted into a Word document, the default style (as set in the document) is applied. To specify a different table style - or an advanced paragraph/character style - you will need to include the following:
!!(.docx Style "Table Grid")
(substitute with the name of the style you want to apply)
Note: The style must be defined in the Word document. Built-in styles (e.g. "Plain Table 1") are not included until they have been used at least once.
HTML Document (.html
)
Note: These features also apply to Email Message (.eml
); however, please be advised that some email clients (e.g. Microsoft Outlook) only support a limited subset of what is normally possible in HTML.
Class
Adds a custom Cascading Style Sheet (CSS) class name to the HTML tag containing the feature.
!!(.html class nameOfMyClass)
You can target one of the tag's ancestors by specifying its name (e.g. table cell aka <td>
):
!!(.html class nameOfMyClass td)
Classes are usually used in conjunction with Stylesheet (.css
) files, which can be added as inline attachments.
Style
Adds a custom CSS style to the HTML tag containing the feature.
!!(.html style "text-align: right; color: red;")
You can target one of the tag's ancestors by specifying its name (e.g. paragraph aka <p>
):
!!(.html style "text-align: right; color: red;" p)
Title
Adds a tooltip to the text in the fallback section of the feature.
!!(.html title "Help text")[Hover over this text]