From fafb5adc9870c7acc905c6adfc739c73d3985790 Mon Sep 17 00:00:00 2001 From: William Park Date: Fri, 23 Aug 2024 08:28:52 +0100 Subject: [PATCH] feat: add data attribute on ReactNodeViewContent div (#5539) --- packages/react/src/ReactNodeViewRenderer.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react/src/ReactNodeViewRenderer.tsx b/packages/react/src/ReactNodeViewRenderer.tsx index 18f71d3855..4f16c0c8c9 100644 --- a/packages/react/src/ReactNodeViewRenderer.tsx +++ b/packages/react/src/ReactNodeViewRenderer.tsx @@ -125,6 +125,7 @@ export class ReactNodeView< } if (this.contentDOMElement) { + this.contentDOMElement.dataset.nodeViewContentReact = '' // For some reason the whiteSpace prop is not inherited properly in Chrome and Safari // With this fix it seems to work fine // See: https://github.com/ueberdosis/tiptap/issues/1197