Skip to content

Commit

Permalink
fix: πŸ› clipboard bug for paste images
Browse files Browse the repository at this point in the history
βœ… Closes: #542
  • Loading branch information
Saul-Mirone committed Jun 5, 2022
1 parent 5d69a28 commit 5a30391
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/plugin-clipboard/src/clipboard.ts
Expand Up @@ -52,6 +52,9 @@ export const clipboardPlugin = createPlugin(() => {

let text = clipboardData.getData('text/plain');
const html = clipboardData.getData('text/html');
if (html.length === 0 && text.length === 0) {
return false;
}
if (html.length > 0 || text.length === 0) {
const dom = document.createElement('template');
dom.innerHTML = html;
Expand Down

1 comment on commit 5a30391

@vercel
Copy link

@vercel vercel bot commented on 5a30391 Jun 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.