Skip to main content
Version: Next

Generate HTML

Node data storage requires the data to be persisted as HTML structures; therefore, nodes must be converted into HTML. This is achieved by configuring the elementToHtml method of a module to return a string representing the corresponding HTML structure.

For example, the Attribute module converts nodes into the HTML structure shown below by configuring its elementToHtml method. For details on the Attribute module’s elementToHtml implementation, please refer to the source code .