Skip to content

Commit

Permalink
Merge pull request #331 from faseehahmed1/master
Browse files Browse the repository at this point in the history
Context Menu Paste issue fixed.
  • Loading branch information
nick-keller authored Jan 18, 2024
2 parents 108d6c2 + 35c777c commit 783dba4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/components/DataSheetGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1561,12 +1561,12 @@ export const DataSheetGrid = React.memo(
const items = await navigator.clipboard.read()
items.forEach(async (item) => {
let pasteData = [['']]
if (item.types.includes('text/plain')) {
const plainTextData = await item.getType('text/plain')
pasteData = parseTextPlainData(await plainTextData.text())
} else if (item.types.includes('text/html')) {
if (item.types.includes('text/html')) {
const htmlTextData = await item.getType('text/html')
pasteData = parseTextHtmlData(await htmlTextData.text())
} else if (item.types.includes('text/plain')) {
const plainTextData = await item.getType('text/plain')
pasteData = parseTextPlainData(await plainTextData.text())
} else if (item.types.includes('text')) {
const htmlTextData = await item.getType('text')
pasteData = parseTextHtmlData(await htmlTextData.text())
Expand Down

0 comments on commit 783dba4

Please sign in to comment.