@sqlrooms/documents / blockDocumentNodeToBlock
Function: blockDocumentNodeToBlock()
blockDocumentNodeToBlock(
node): {id:string;type:"heading";level:1|2|3;text:string; } | {id:string;type:"paragraph";text:string; } | {id:string;type:"richText";markdown:string; } | {id:string;type:"list";ordered?:boolean;items:string[]; } | {id:string;type:"todo";checked:boolean;text:string; } | {id:string;type:"image";assetId:string;caption?:string; } | {id:string;type:"chartImage";assetId:string;caption?:string; } | {id:string;type:"chart";tableName:string;config:unknown;selectionGroupId?:string;caption?:string; } | {id:string;type:"statefulBlock";blockType:string;blockInstanceId:string;ownership?:"owned"|"shared"|"external";title?:string;caption?:string;height?:number; } |undefined
Parameters
| Parameter | Type |
|---|---|
node | BlockDocumentNode |
Returns
{ id: string; type: "heading"; level: 1 | 2 | 3; text: string; } | { id: string; type: "paragraph"; text: string; } | { id: string; type: "richText"; markdown: string; } | { id: string; type: "list"; ordered?: boolean; items: string[]; } | { id: string; type: "todo"; checked: boolean; text: string; } | { id: string; type: "image"; assetId: string; caption?: string; } | { id: string; type: "chartImage"; assetId: string; caption?: string; } | { id: string; type: "chart"; tableName: string; config: unknown; selectionGroupId?: string; caption?: string; } | { id: string; type: "statefulBlock"; blockType: string; blockInstanceId: string; ownership?: "owned" | "shared" | "external"; title?: string; caption?: string; height?: number; } | undefined
