Function copyHtmlToClipboard

  • Copy HTML to clipboard. When pasting into rich text field, pastes rich text. When pasting into plain text field, pastes: plain text, html, or markdown.

    Parameters

    • html: string

      The HTML content to be copied.

    • options: {
          pastePlainWithHTML: boolean;
          pastePlainWithMarkdown: boolean;
      } = {}

      The options object.

      • pastePlainWithHTML: boolean

        If true, the plain text will be the same as the HTML. If false, the plain text will be the same as the HTML, without the HTML tags.

      • pastePlainWithMarkdown: boolean

        If true, the plain text will be markdown. If false, the plain text will be the same as the HTML, without the HTML tags.

    Returns Promise<void>

    • A promise that resolves when the HTML is copied to the clipboard.