Function toHtmlTable

  • A cell matrix as HTML <table> for the clipboard (text/html): every text escaped, line breaks as <br>, numbers with x:num (Excel keeps the number although the cell shows formatted text). DOM-free.

    Parameters

    • matrix: readonly (readonly HtmlTableCellIf[])[]

      rows of cells

    Returns string

    the HTML

    Example

    toHtmlTable([[{ text: "1,234.50 €", num: 1234.5 }]]);
    // '<meta charset="utf-8"><table><tbody><tr><td x:num="1234.5">1,234.50 €</td></tr></tbody></table>'

    Since

    1.1.99