1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

fixing paste html example (#3070)

This commit is contained in:
Entkenntnis
2019-11-09 23:56:46 +01:00
committed by Ian Storm Taylor
parent 6fc0bc85e6
commit 862e74a0cb

View File

@@ -295,6 +295,7 @@ class PasteHtml extends React.Component {
*/
onPaste = (event, editor, next) => {
event.preventDefault()
const transfer = getEventTransfer(event)
if (transfer.type !== 'html') return next()
const { document } = serializer.deserialize(transfer.html)