noteloom

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 }
OptionTypeDefaultWhat it does
docDocument JSONone empty paragraphThe starting document — the same shape exportDocumentJSON produces.
historybooleantrueSet false for a plain store with no undo/redo tracking.
registerBlocks(registry) => voidregisters every built-in blockCalled 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) => voidregisters every built-in inline typeSame 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>
PropTypeWhat it does
editorresult of useEditor()Required — the wired-up store/registry pair.
className / stylestring / objectWraps 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 | undefinedPer-block class names, appended onto that block's own root element.
commentAuthorId / onCommentstring / functionThe built-in comment composer, or full control over what happens on "Comment." See Comments.
showCommentsPanelbooleanA persistent sidebar listing every comment thread, unresolved first.
childrenReact nodesRendered 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.