Skip to content

@sqlrooms/documents / blockDocumentBlockToNode

Function: blockDocumentBlockToNode()

blockDocumentBlockToNode(block): BlockDocumentNode

Parameters

ParameterType
block{ 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; }

Returns

BlockDocumentNode