开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.
fix(text): resolve with-text build error (#41)
pubuzhixing8b74abc1e9871
diff --git a/package.json b/package.jsonindex ca9ae9d..fb4a243 100644--- a/package.json+++ b/package.json@@ -3,7 +3,7 @@"version": "0.0.1","license": "MIT","scripts": {- "start": "nx serve web",+ "start": "nx serve web --host=0.0.0.0","build": "nx run-many -t=build","test": "nx run-many -t=test"},diff --git a/packages/react-text/src/plugins/with-text.ts b/packages/react-text/src/plugins/with-text.tsindex 844bb5e..e2c0d0f 100644--- a/packages/react-text/src/plugins/with-text.ts+++ b/packages/react-text/src/plugins/with-text.ts@@ -1,4 +1,3 @@-import { CLIPBOARD_FORMAT_KEY } from '@plait/text-plugins';import { ReactEditor } from 'slate-react';export const withText = <T extends ReactEditor>(editor: T) => {@@ -11,7 +10,7 @@ export const withText = <T extends ReactEditor>(editor: T) => {e.insertData = (data: DataTransfer) => {let text = data.getData('text/plain');- let plaitData = data.getData(`application/${CLIPBOARD_FORMAT_KEY}`);+ let plaitData = data.getData(`application/x-slate-fragment`);if (!plaitData && text) {if (text.endsWith('\n')) {text = text.substring(0, text.length - 1);