Type Alias TableOfContentsObjectSource
TableOfContentsObjectSource:
| {
data: { content: string; level: number };
id?: string;
type: "heading";
}
| { data: { level: number; text: string }; id?: string; type: "header" }
| {
attrs: { level: number };
content: { text?: string; type: string }[];
id?: string;
type: "header";
}
The shape of heading entries that are created by tools like the Codex or EditorJS block content editors.