diff --git a/packages/editor/src/extensions/react/react-node-view.tsx b/packages/editor/src/extensions/react/react-node-view.tsx index ecb70ca35..a9121fa63 100644 --- a/packages/editor/src/extensions/react/react-node-view.tsx +++ b/packages/editor/src/extensions/react/react-node-view.tsx @@ -32,6 +32,7 @@ import { Editor, NodeViewRendererProps } from "@tiptap/core"; import { __serializeForClipboard, EditorView } from "prosemirror-view"; import { EmotionThemeProvider } from "@notesnook/theme"; import { isAndroid, isiOS } from "../../utils/platform"; +import { useToolbarStore } from "../../toolbar/stores/toolbar-store"; // This is hacky workaround to manually handle serialization when // drag/dropping on mobile devices. @@ -158,9 +159,16 @@ export class ReactNodeView

implements NodeView { Component: FunctionComponent = () => { if (!this.options.component) return null; - return ( - + ; } & Omit; function _EmotionThemeProvider( @@ -44,6 +45,7 @@ function _EmotionThemeProvider( scope = "base", injectCssVars = true, className, + theme: partialTheme, ...restProps } = props; const emotionTheme = useTheme() as Theme; @@ -66,6 +68,7 @@ function _EmotionThemeProvider( ...(emotionTheme && "space" in emotionTheme ? emotionTheme : themeProperties), + ...partialTheme, colors: themeProperties.colors }} >