From 6b163d0cb8f251600f5c0dfb2da37f65e6489b2b Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sat, 30 Jul 2022 14:23:23 +0800 Subject: [PATCH] tiptap: improve paste --- packages/client/src/tiptap/core/extensions/paste.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/tiptap/core/extensions/paste.ts b/packages/client/src/tiptap/core/extensions/paste.ts index aded019..2109bb2 100644 --- a/packages/client/src/tiptap/core/extensions/paste.ts +++ b/packages/client/src/tiptap/core/extensions/paste.ts @@ -111,7 +111,7 @@ export const Paste = Extension.create({ } // FIXME:各家 office 套件标准不一样,是否需要做成用户自行选择粘贴 html 或者 图片? - if (html?.length) { + if (html?.includes('urn:schemas-microsoft-com:office') || html?.includes('')) { const doc = htmlToProsemirror({ schema: editor.schema, html,