docx
    Preparing search index...

    Function htmlToRuns

    • Turns HTML into the content of a paragraph: runs of text, hyperlinks, images and the rest, such as for a paragraph of a document's own, or to patch a paragraph of a template with.

      It reads HTML as htmlToContent does. Paragraphs in the HTML are lines of the paragraph, and the content of tables and lists is kept, without the tables and lists, with a warning, as a paragraph can't have them.

      Parameters

      • html: string

        The HTML, such as "<b>Due</b> on <i>Friday</i>"

      • options: HtmlOptions = {}

        Options, such as the images and CSS of the HTML

      Returns readonly ParagraphChild[]

      The paragraph's content

      new Paragraph({ children: htmlToRuns("Total: <b>£120</b>") });