开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.
feat(text): support insertSoftBreak for text #136
pubuzhixing897ab1d469c7a
diff --git a/packages/react-text/src/plugins/with-text.ts b/packages/react-text/src/plugins/with-text.tsindex 9704026..e05ce06 100644--- a/packages/react-text/src/plugins/with-text.ts+++ b/packages/react-text/src/plugins/with-text.ts@@ -8,6 +8,10 @@ export const withText = <T extends ReactEditor>(editor: T) => {editor.insertText('\n');};+ e.insertSoftBreak = () => {+ editor.insertText('\n');+ };+e.insertData = (data: DataTransfer) => {let text = data.getData('text/plain');const plaitData = data.getData(`application/x-slate-fragment`);