diff --git a/.changeset/small-parrots-give.md b/.changeset/small-parrots-give.md new file mode 100644 index 00000000..33b29f2b --- /dev/null +++ b/.changeset/small-parrots-give.md @@ -0,0 +1,5 @@ +--- +"slate-angular": patch +--- + +only exec JSON.stringify for element diff --git a/packages/src/utils/clipboard/navigator-clipboard.ts b/packages/src/utils/clipboard/navigator-clipboard.ts index 69876000..816c4932 100644 --- a/packages/src/utils/clipboard/navigator-clipboard.ts +++ b/packages/src/utils/clipboard/navigator-clipboard.ts @@ -11,7 +11,7 @@ export const setNavigatorClipboard = async (htmlText: string, data: Element[], t 'text/html': new Blob([htmlText], { type: 'text/html' }), - 'text/plain': new Blob([JSON.stringify(textClipboard ?? data)], { type: 'text/plain' }) + 'text/plain': new Blob([textClipboard ?? JSON.stringify(data)], { type: 'text/plain' }) }) ]); }