Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 1x 1x 356x 356x 547x 356x | import { createTableRow } from './createTableRow'; import type { ContentModelTable, ContentModelTableFormat, ContentModelTableRow, } from 'roosterjs-content-model-types'; /** * Create a ContentModelTable model * @param rowCount Count of rows of this table * @param format @optional The format of this model */ export function createTable( rowCount: number, format?: Readonly<ContentModelTableFormat> ): ContentModelTable { const rows: ContentModelTableRow[] = []; for (let i = 0; i < rowCount; i++) { rows.push(createTableRow()); } return { blockType: 'Table', rows, format: { ...format }, widths: [], dataset: {}, }; } |