import type { Editor, Extension } from '@prosekit/core' import { createContext, useContext, type ContextProviderComponent } from 'solid-js' const editorContext = createContext(null) /** * @internal */ export function useEditorContext(): Editor | null { return useContext(editorContext) } /** * @internal */ export const EditorContextProvider: ContextProviderComponent = editorContext.Provider