addHTML
Class: mlreportgen.dom.Document
Namespace: mlreportgen.dom
Append HTML string to document
Syntax
htmlObjOut = addHTML(documentObj,htmlText)
Description
converts
a string of HTML text to a group of DOM objects and appends the group
to the htmlObjOut = addHTML(documentObj,htmlText)Document object documentObj.
Input Arguments
Output Arguments
Examples
Tips
MATLAB® Report Generator™
mlreportgen.dom.HTMLormlreportgen.dom.HTMLFileobjects typically cannot accept the raw HTML output of third-party applications, such as Microsoft Word, that export native documents as HTML markup. In these cases, your Report API report generation program can use themlreportgen.utils.html2dom.prepHTMLStringandmlreportgen.utils.html2dom.prepHTMLFilefunctions to prepare the raw HTML for use with themlreportgen.dom.HTMLormlreportgen.dom.HTMLFileobjects. Typically, your program will have to further process the prepared HTML to remove valid but undesirable objects, such as line feeds that were in the raw content.By default, the DOM API uses a base font size of 12 points to convert
emunits to actual font sizes. For example, a font size specified as2emconverts to 24 points. To specify a different base font size, add your content to a report by using anmlreportgen.dom.HTMLobject. Set theEMBaseFontSizeproperty of the object to the base font size. For example, if you set theEMBaseFontSizeproperty to 14, a font size of2emconverts to 28 points.
Version History
Introduced in R2015a