writeHtml
이 콘텐츠는 아직 번역되지 않았습니다.
Module @netwiv/api/plugins/clipboard-manager · Kind Function
import { writeHtml } from '@netwiv/api/plugins/clipboard-manager';- Writes HTML or fallbacks to write provided plain text to the clipboard.
Platform-specific
Section titled “Platform-specific”- Android / iOS: Not supported.
Signature
Section titled “Signature”function writeHtml(html: string, altText?: string | undefined): Promise<void>Example
Section titled “Example”import { writeHtml } from '@netwiv/api/plugins/clipboard-manager';await writeHtml('<h1>Tauri is awesome!</h1>', 'plaintext');// The following will write "<h1>Tauri is awesome</h1>" as plain textawait 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>');Upstream since 2.0.0
Descriptions come from the pinned @tauri-apps/plugin-clipboard-manager@2.3.3 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.