Configuration
Every option useEditor() and <NoteloomEditor> accept, in one place. Each is also covered in depth on its own page — this is the quick reference, not the full explanation.
useEditor(options)
jsx
const editor = useEditor({
doc: myStarterDoc, // defaults to one empty paragraph
history: true, // default; false gives a plain store with no undo/redo
registerBlocks: (registry) => { /* ... */ },
registerInlineTypes: (inlineRegistry) => { /* ... */ },
});
// editor === { store, registry, inlineRegistry }| Option | Type | Default | What it does |
|---|---|---|---|
doc | Document JSON | one empty paragraph | The starting document — the same shape exportDocumentJSON produces. |
history | boolean | true | Set false for a plain store with no undo/redo tracking. |
registerBlocks | (registry) => void | registers every built-in block | Called once to build the block registry — call registerBuiltInBlocks(registry) yourself first if you want everything built-in plus your own; see Registering custom blocks. |
registerInlineTypes | (inlineRegistry) => void | registers every built-in inline type | Same idea for inline types — see Custom select field types for the common case of adding your own dropdown/mention field. |
<NoteloomEditor> props
jsx
<NoteloomEditor
editor={editor}
className="my-editor"
style={{ '--noteloom-accent': '#16a34a' }}
theme="none" // opt out of the auto-injected default theme
getBlockClassName={(block) => (block.type === 'callout' ? 'my-callout' : undefined)}
commentAuthorId={currentUser.id}
showCommentsPanel
onComment={(range) => { /* full control instead of commentAuthorId's built-in composer */ }}
>
{/* anything here renders after the editor surface — toolbars, modals, panels */}
</NoteloomEditor>| Prop | Type | What it does |
|---|---|---|
editor | result of useEditor() | Required — the wired-up store/registry pair. |
className / style | string / object | Wraps the editor surface in one <div className="be-root ..."> — the hook for scoping --noteloom-* overrides to one instance. See Theming & styling. |
theme | 'default' | 'none' | Default injects the built-in theme automatically; "none" opts out entirely. |
getBlockClassName | (block) => string | undefined | Per-block class names, appended onto that block's own root element. |
commentAuthorId / onComment | string / function | The built-in comment composer, or full control over what happens on "Comment." See Comments. |
showCommentsPanel | boolean | A persistent sidebar listing every comment thread, unresolved first. |
children | React nodes | Rendered after the editor surface, inside the same EditorProvider — the mount point for a toolbar, FieldTypeEditorModal, or anything else that needs editor context. |
Need more control than either of these gives you — a hand-picked subset of hooks, mobile chrome mounted separately, a completely custom surface element? See the granular API in Getting started.