From eb94dda28abf459fd9706a0609f9c5f2e655c8f3 Mon Sep 17 00:00:00 2001 From: FabianLars Date: Mon, 9 Dec 2024 23:10:17 +0100 Subject: [PATCH] docs(clipboard): Remove readHtml mention --- plugins/clipboard-manager/README.md | 1 - plugins/clipboard-manager/guest-js/index.ts | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/clipboard-manager/README.md b/plugins/clipboard-manager/README.md index 935d8ff9..57b89526 100644 --- a/plugins/clipboard-manager/README.md +++ b/plugins/clipboard-manager/README.md @@ -72,7 +72,6 @@ import { writeText, readText, writeHtml, - readHtml, clear } from '@tauri-apps/plugin-clipboard-manager' await writeText('Tauri is awesome!') diff --git a/plugins/clipboard-manager/guest-js/index.ts b/plugins/clipboard-manager/guest-js/index.ts index fb730426..19851fe0 100644 --- a/plugins/clipboard-manager/guest-js/index.ts +++ b/plugins/clipboard-manager/guest-js/index.ts @@ -111,9 +111,11 @@ async function readImage(): Promise { * * @example * ```typescript - * import { writeHtml, readHtml } from '@tauri-apps/plugin-clipboard-manager'; + * import { writeHtml } from '@tauri-apps/plugin-clipboard-manager'; * await writeHtml('

Tauri is awesome!

', 'plaintext'); - * await writeHtml('

Tauri is awesome!

', '

Tauri is awesome

'); // Will write "

Tauri is awesome

" as plain text + * // The following will write "

Tauri is awesome

" as plain text + * await writeHtml('

Tauri is awesome!

', '

Tauri is awesome

'); + * // we can read html data only as a string so there's just readText(), no readHtml() * assert(await readText(), '

Tauri is awesome!

'); * ``` *