mlreportgen.dom.TemplateHTMLStyle Class
Namespace: mlreportgen.dom
Description
Use this class to create a Document Object Model (DOM) representation of an existing style in an HTML template. This class generates a style sheet entry in HTML style sheets only. PDF and DOCX template style sheets ignore this class. This class enables you to see what styles already exist in a template.
This class represents an HTML style defined by an HTML template (.htmtx
or .htmt
) file. Opening an HTML template creates an array containing an
instance of this class for each style defined by the template file. You can access the styles
by using the TemplateStyles
property of the style sheet stored in the
Stylesheet
property. Use this class to view and modify the CSS selector
and formats for an HTML style. You can remove or replace HTML styles using the
removeStyle
and replaceStyle
methods of the template style
sheet.
The mlreportgen.dom.TemplateHTMLStyle
class is a handle
class.
Creation
Description
creates an HTML style and sets the style
= TemplateHTMLStyle(selector
,rawFormats
)Selector
and
RawFormats
properties to the values of selector
and
rawFormats
, respectively. Use this constructor to define HTML
styles that use more complex CSS selectors or formats that do not have equivalent DOM
classes.
Properties
Examples
Version History
Introduced in R2024a