Components
Main Components:
ProseMirror.tsx:
- This is the main wrapper component for integrating ProseMirror with React. It uses the EditorContext and manages the ProseMirror instance.
Editor.tsx:
- A component that uses the useEditorView hook and provides the EditorContext to its children.
NodeViews.tsx:
- Handles rendering of custom node views using React components.
Hooks:
useEditorView.ts:
- Creates and manages the ProseMirror EditorView.
useEditorEffect.ts:
- A custom hook for running effects after the EditorView has been updated.
useEditorEventCallback.ts:
- Provides a stable callback that can access the latest EditorView.
useEditorEventListener.ts: