docs(clipboard): Remove readHtml mention

This commit is contained in:
FabianLars
2024-12-09 23:10:17 +01:00
parent 6fcb2f5f40
commit eb94dda28a
2 changed files with 4 additions and 3 deletions

View File

@@ -72,7 +72,6 @@ import {
writeText,
readText,
writeHtml,
readHtml,
clear
} from '@tauri-apps/plugin-clipboard-manager'
await writeText('Tauri is awesome!')

View File

@@ -111,9 +111,11 @@ async function readImage(): Promise<Image> {
*
* @example
* ```typescript
* import { writeHtml, readHtml } from '@tauri-apps/plugin-clipboard-manager';
* import { writeHtml } from '@tauri-apps/plugin-clipboard-manager';
* await writeHtml('<h1>Tauri is awesome!</h1>', 'plaintext');
* await writeHtml('<h1>Tauri is awesome!</h1>', '<h1>Tauri is awesome</h1>'); // Will write "<h1>Tauri is awesome</h1>" as plain text
* // 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>');
* ```
*