a tool for shared writing and social publishing
0
fork

Configure Feed

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

replace text on paste to maintain cursor pos

+3 -1
+3 -1
components/Blocks/TextBlock/useHandlePaste.ts
··· 500 500 tr.delete(block.editor.selection.from, block.editor.selection.to); 501 501 if (type === "blockquote") { 502 502 tr.replaceWith(0, tr.doc.content.size, content.content); 503 - } else tr.insert(block.editor.selection.from || 1, content.content); 503 + } else { 504 + tr.replaceSelectionWith(content); 505 + } 504 506 let newState = block.editor.apply(tr); 505 507 setEditorState(entityID, { 506 508 editor: newState,