We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26cb873 commit 8cff741Copy full SHA for 8cff741
src/block/text/util.js
@@ -12,8 +12,8 @@ export const useOnPaste = clientId => {
12
return useCallback( event => {
13
event.preventDefault()
14
// Get the raw HTML from the clipboard
15
- const html = event.clipboardData.getData( 'text/html' )
16
- const plain = event.clipboardData.getData( 'text/plain' )
+ const html = event.clipboardData?.getData( 'text/html' ) || ''
+ const plain = event.clipboardData?.getData( 'text/plain' ) || ''
17
18
const blocks = pasteHandler( {
19
HTML: html,
0 commit comments