setHTMLFormat
A logic command that creates a format that can be used with HTML Values. This format allows certain attributes to be removed from the elements in the HTML.
Attributes
name | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | Yes |
Defines a name for the created format. If defined, other commands can choose to use this format by referring to it by this name. Leaving the created format nameless declares it as the default format for HTML Values. A command that prints out a HTML Value may then use this format automatically, unless the command specifies a named format for itself. If a default format for HTML Values has already been set, this new format will take its place as the default. |
removeClassAttr | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | Yes |
Specifies if the formatting process will remove the If not defined, value of |
removeStyleAttr | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | Yes |
Specifies if the formatting process will remove the If not defined, value of |
Examples
This format can be used to remove element-specific styling information from HTML content found within a HTML Value. For example, a HTML Value looking like this:
<p class="big-text" style="color: red;">Example text</p>
When formatted with a HTML Value format created with this:
<setHTMLFormat removeStyleAttr="${true}">
Results in the HTML losing its local color definition when formatted:
<p class="big-text">Example text</p>