diff --git a/packages/client/src/tiptap/core/extensions/flow.ts b/packages/client/src/tiptap/core/extensions/flow.ts index 2b752f6..7ff9ec0 100644 --- a/packages/client/src/tiptap/core/extensions/flow.ts +++ b/packages/client/src/tiptap/core/extensions/flow.ts @@ -17,6 +17,9 @@ declare module '@tiptap/core' { } } +const DEFAULT_XML = + ''; + export const Flow = Node.create({ name: 'flow', group: 'block', @@ -34,7 +37,7 @@ export const Flow = Node.create({ parseHTML: getDatasetAttribute('height'), }, data: { - default: '', + default: DEFAULT_XML, parseHTML: getDatasetAttribute('data'), }, }; @@ -66,7 +69,7 @@ export const Flow = Node.create({ (options) => ({ tr, commands, chain, editor }) => { options = options || {}; - options.data = options.data || ''; + options.data = options.data || DEFAULT_XML; // @ts-ignore if (tr.selection?.node?.type?.name == this.name) {