noteloom

Divider

A horizontal rule. The simplest block in the package — no props, no runs, nothing to type into.

json
{ "id": "d1", "type": "divider", "parentId": "root", "contentIds": [], "props": {} }

Usage

Inserting a divider automatically seeds a fresh paragraph right after it, since a divider has no run of its own to focus the cursor into.

Slash command

Divider — keywords: divider, hr, separator, line.

Styling

Rendered as an <hr> with class .be-divider.

Using it in your editor

useEditor() registers every built-in block by default, divider included. To register only the blocks you use instead:

jsx
import { useEditor, NoteloomEditor, registerBlocks, paragraphBlockType, dividerBlockType } from 'noteloom';

function Editor() {
  const editor = useEditor({
    registerBlocks: (registry) => registerBlocks(registry, { paragraph: paragraphBlockType, divider: dividerBlockType }),
  });
  return <NoteloomEditor editor={editor} />;
}

See Picking only the blocks you want for combining this with other types.