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