toHtml

Mutate rendered html before returing it. Need to be call after rendering

toHtml(mutateHtml: {
    editAttribs?: (name: string, attribs: HtmlAttributes) => HtmlAttributes,
    prepend?: (name: string, attribs: HtmlAttributes) => HtmlNode[],
    append?: (name: string, attribs: HtmlAttributes) => HtmlNode[],
    replace?: (name: string, attribs: HtmlAttributes) => HtmlNode
} = {})

Parameters:

(Optional) editAttribs: Function to modify attributes (Optional) prepend: Function to prepend html nodes (Optional) append: Function to append html nodes (Optional) replace: Function to replace html node

Examples