From e5c6c3cc07d524137c46193abd5b973401c3a459 Mon Sep 17 00:00:00 2001 From: DarkPhoenix2704 Date: Sat, 9 Nov 2024 09:53:34 +0000 Subject: [PATCH] fix: oss sync --- .../nc-gui/helpers/tiptapExtensions/mention/index.ts | 10 ++++++++++ .../helpers/tiptapExtensions/mention/suggestion.ts | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 packages/nc-gui/helpers/tiptapExtensions/mention/index.ts create mode 100644 packages/nc-gui/helpers/tiptapExtensions/mention/suggestion.ts diff --git a/packages/nc-gui/helpers/tiptapExtensions/mention/index.ts b/packages/nc-gui/helpers/tiptapExtensions/mention/index.ts new file mode 100644 index 0000000000..a50ef83505 --- /dev/null +++ b/packages/nc-gui/helpers/tiptapExtensions/mention/index.ts @@ -0,0 +1,10 @@ +import * as TipTapMention from '@tiptap/extension-mention' + +export const Mention = TipTapMention.Mention.extend({ + renderHTML({ HTMLAttributes: _ }) { + return ['span'] + }, + renderText({ node: _ }) { + return '' + }, +}) diff --git a/packages/nc-gui/helpers/tiptapExtensions/mention/suggestion.ts b/packages/nc-gui/helpers/tiptapExtensions/mention/suggestion.ts new file mode 100644 index 0000000000..33b0d250af --- /dev/null +++ b/packages/nc-gui/helpers/tiptapExtensions/mention/suggestion.ts @@ -0,0 +1,9 @@ +export default { + render: () => { + return { + onStart: (_props: Record) => {}, + + onUpdate(_props: Record) {}, + } + }, +}