@verso-editor/extension-outline
v1.0.0
Published
Document Outline extension for Verso Editor. Monitors heading nodes and provides an `onUpdate` callback with the outline structure.
Readme
@verso-editor/extension-outline
Document Outline extension for Verso Editor. Monitors heading nodes and provides an onUpdate callback with the outline structure.
Install
pnpm add @verso-editor/extension-outlineUsage
import { OutlineExtension } from '@verso-editor/extension-outline'
const ext = OutlineExtension.configure({
onUpdate: (outline) => {
console.log(outline) // [{ level: 1, text: 'Title', pos: 0, id: 'heading-0' }, ...]
},
})Included in createStarterKit().
