Skip to content

Commit

Permalink
fix(clipboard): only exec JSON.stringify for element #WIK-15713 (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanhuanwa committed Jun 6, 2024
1 parent a940201 commit 39ac800
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/small-parrots-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"slate-angular": patch
---

only exec JSON.stringify for element
2 changes: 1 addition & 1 deletion packages/src/utils/clipboard/navigator-clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
})
]);
}
Expand Down

0 comments on commit 39ac800

Please sign in to comment.