Render the editable field
Place EditorContent inside EditorProvider. useEditorContext() gives descendants the instance. className styles the field, ariaLabel names it, and ariaDescribedBy points to help text by ID. Remounting the field with the same instance keeps its content and history. Drag and drop is disabled.
import { Bold, EditorContent, EditorProvider, useEditor } from 'yurich';
export function ArticleEditor() {
const editor = useEditor({ extensions: [Bold] });
return (
<EditorProvider editor={editor}>
<EditorContent ariaLabel="Article" />
</EditorProvider>
);
}