Skip to main content
Version: 1.0.0

Checklist Plugin

ChecklistPlugin adds interactive checklist behavior on top of regular list/block content.

Install and import​

import { ChecklistPlugin } from "@editora/plugins";
// or: import { ChecklistPlugin } from "@editora/plugins/checklist";

Usage​

const plugins = [ChecklistPlugin()];

Command Matrix​

ActionCommandShortcutToolbar
Toggle checklist modetoggleChecklistMod-Shift-9Checklist

Config Options​

This plugin does not expose plugin-level config options. It uses editor selection, history, and theme/runtime defaults.

Behavior​

  • Converts selected blocks into checklist items
  • Converts existing ul/ol structures into checklist format
  • Converts checklist back to paragraph/list content
  • Preserves caret position after structural conversion

Markup Model​

  • Container: ul[data-type="checklist"]
  • Item: li[data-type="checklist-item"][data-checked="true|false"]
  • Item content is normalized around paragraph nodes

Validation checklist​

  • Multi-line selection converts all selected lines
  • Checkbox area click toggles data-checked
  • Readonly mode blocks toggle behavior
  • Undo/redo restores checklist structure and checked state