a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix pasting single image

+7 -1
+7 -1
components/Blocks/TextBlock/useHandlePaste.ts
··· 78 78 let xml = new DOMParser().parseFromString(textHTML, "text/html"); 79 79 let currentPosition = propsRef.current.position; 80 80 let children = flattenHTMLToTextBlocks(xml.body); 81 - if (!(children.length === 1 && children[0].tagName === "IMG")) { 81 + if ( 82 + !( 83 + children.length === 1 && 84 + children[0].tagName === "IMG" && 85 + e.clipboardData.items.length > 0 86 + ) 87 + ) { 82 88 children.forEach((child, index) => { 83 89 createBlockFromHTML(child, { 84 90 undoManager,