noteloom

Checkbox (inline)

An inline checkbox with a text label, embeddable mid-sentence — different from a to-do list item, which is a whole line. Use this when a checkbox needs to sit inside a paragraph alongside other text.

json
{ "id": "r1", "type": "checkbox", "value": "", "marks": {}, "data": { "checked": false, "label": "Ship it" } }

Slash command

Checkbox — keywords: checkbox, todo, check, toggle.

Styling

.be-inline-checkbox (wrapper), .be-inline-checkbox-label.

Using it in your editor

useEditor() registers every built-in inline type by default, checkbox included. To register only the ones you use instead:

jsx
import { useEditor, NoteloomEditor, registerInlineTypes, checkboxInlineType } from 'noteloom';

function Editor() {
  const editor = useEditor({
    registerInlineTypes: (inlineRegistry) => registerInlineTypes(inlineRegistry, { checkbox: checkboxInlineType }),
  });
  return <NoteloomEditor editor={editor} />;
}