You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example of how to do this outside this hook. Would be nice to use this hook and be able to pass multiple formats.
constplainText="Hello, this is plain text!";consthtmlText=`<p style="color:blue;">Hello, this is <strong>HTML</strong> text!</p>`;constmarkdownText="**Hello**, this is Markdown text!";// Create a ClipboardItem with multiple formatsconstclipboardItem=newClipboardItem({"text/plain": newBlob([plainText],{type: "text/plain"}),"text/html": newBlob([htmlText],{type: "text/html"}),"text/markdown": newBlob([markdownText],{type: "text/markdown"}),});// Write to clipboardawaitnavigator.clipboard.write([clipboardItem]);
The text was updated successfully, but these errors were encountered:
Example of how to do this outside this hook. Would be nice to use this hook and be able to pass multiple formats.
The text was updated successfully, but these errors were encountered: