createTable

Creates a table.

import { EditorUtils } from '@progress/kendo-react-editor';

const nodes = editorRef.view.state.schema.nodes;
const rows = 3;
const columns = 4;

const table = EditorUtils.createTable(nodes, rows, columns);

Parameters

tableTypes { table: NodeType<any>; table_cell: NodeType<any>; table_row: NodeType<any>; }

An object which contains table, table_row, and table_cell node types.

rows number

The number of rows.

columns number

The number of columns.

Returns

Node<any> - The generated table.

 /