@tauri-apps/plugin-clipboard-manager - v2.3.0
    Preparing search index...

    Function writeHtml

      • Writes HTML or fallbacks to write provided plain text to the clipboard.
      • Android / iOS: Not supported.

      Parameters

      • html: string
      • OptionalaltText: string

      Returns Promise<void>

      A promise indicating the success or failure of the operation.

      import { writeHtml } from '@tauri-apps/plugin-clipboard-manager';
      await writeHtml('<h1>Tauri is awesome!</h1>', 'plaintext');
      // The following will write "<h1>Tauri is awesome</h1>" as plain text
      await writeHtml('<h1>Tauri is awesome!</h1>', '<h1>Tauri is awesome</h1>');
      // we can read html data only as a string so there's just readText(), no readHtml()
      assert(await readText(), '<h1>Tauri is awesome!</h1>');

      2.0.0