Skip to content

Commit

Permalink
Update src/block/text/util.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bfintal authored Nov 14, 2024
1 parent 26cb873 commit 8cff741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/block/text/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export const useOnPaste = clientId => {
return useCallback( event => {
event.preventDefault()
// Get the raw HTML from the clipboard
const html = event.clipboardData.getData( 'text/html' )
const plain = event.clipboardData.getData( 'text/plain' )
const html = event.clipboardData?.getData( 'text/html' ) || ''
const plain = event.clipboardData?.getData( 'text/plain' ) || ''

const blocks = pasteHandler( {
HTML: html,
Expand Down

0 comments on commit 8cff741

Please sign in to comment.