UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

55 lines (54 loc) 1.06 kB
import { NodeSpec } from '../../prosemirror'; import { TableCellContent } from './doc'; /** * @name table_node */ export interface Table { type: 'table'; /** * @minItems 1 */ content: Array<TableRow>; } /** * @name table_row_node */ export interface TableRow { type: 'tableRow'; /** * @minItems 1 */ content: Array<TableHeader> | Array<TableCell>; } /** * @name table_cell_node */ export interface TableCell { type: 'tableCell'; attrs: CellAttributes; /** * @minItems 1 */ content: TableCellContent; } /** * @name table_header_node */ export interface TableHeader { type: 'tableHeader'; attrs: CellAttributes; /** * @minItems 1 */ content: TableCellContent; } export interface CellAttributes { colspan: number; rowspan: number; background?: string; } declare const table: NodeSpec; declare const tableCell: NodeSpec; declare const tableHeader: NodeSpec; declare const tableRow: NodeSpec; export { table, tableCell, tableHeader, tableRow };