noteloom

Paragraph

The default block. Plain running text — a leaf block whose contentIds are its own run ids.

JSON shape

json
{ "id": "p1", "type": "paragraph", "parentId": "root", "contentIds": ["r1"], "props": {} }

props is always empty; all content lives in the runs it points to.

Usage

  • Every empty document needs at least one paragraph (or another leaf block) so there's somewhere to type.
  • New blocks created from most slash commands default back to a fresh empty paragraph on the next Enter.
  • Markdown-style shortcuts work inline, on an otherwise-empty line: "# "/"## "/"### " for headings, "- "/"* " for a bulleted list, "1. " for numbered, "[] " for a to-do, "> " for a blockquote, and "```" for a code block.

Styling

Rendered with the .be-paragraph class, styled by noteloom's auto-injected default theme out of the box — see Theming & styling for how to retheme or opt out entirely.

Using it in your editor

useEditor() registers every built-in block by default, paragraph included — most apps need nothing extra here. Paragraph also doubles as noteloom's fallback leaf block (every empty document, and most "Enter" conventions, land back on one), so it's worth keeping even in a hand-picked registry:

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

function Editor() {
  const editor = useEditor({
    registerBlocks: (registry) => registerBlocks(registry, { paragraph: paragraphBlockType /* , ...other types */ }),
  });
  return <NoteloomEditor editor={editor} />;
}

See Picking only the blocks you want for combining this with other types, or keeping everything built-in and adding your own on top.