+ {/* The actual contentEditable that Prosemirror mounts to */}
+
+ {/* The UI elements such as sidebar, formatting toolbar, etc. */}
+ {children}
+
+ );
+};
diff --git a/packages/react/src/editor/BlockNoteViewContext.ts b/packages/react/src/editor/BlockNoteViewContext.ts
new file mode 100644
index 0000000000..f285ddace4
--- /dev/null
+++ b/packages/react/src/editor/BlockNoteViewContext.ts
@@ -0,0 +1,19 @@
+import { createContext, useContext } from "react";
+import { BlockNoteDefaultUIProps } from "./BlockNoteDefaultUI.js";
+
+export type BlockNoteViewContextValue = {
+ editorProps: any;
+ defaultUIProps: BlockNoteDefaultUIProps;
+};
+
+export const BlockNoteViewContext = createContext<
+ BlockNoteViewContextValue | undefined
+>(undefined);
+
+export function useBlockNoteViewContext():
+ | BlockNoteViewContextValue
+ | undefined {
+ const context = useContext(BlockNoteViewContext) as any;
+
+ return context;
+}