@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
19 lines (18 loc) • 1.01 kB
TypeScript
import { TableMap, Node, Slice, Schema, EditorState, EditorView } from '../../prosemirror';
export interface TableRelativePosition {
from: number;
to: number;
}
export declare const getColumnPos: (column: any, tableNode: Node) => TableRelativePosition;
export declare const getRowPos: (row: any, tableNode: Node) => TableRelativePosition;
export declare const getTablePos: (tableNode: Node) => TableRelativePosition;
export declare const createTableNode: (rows: number, columns: number, schema: Schema<any, any>) => Node;
export declare const isIsolating: (node: Node) => boolean;
export interface SelectedCells {
anchor: number;
head: number;
}
export declare const getSelectedColumn: (state: EditorState<any>, map: TableMap) => SelectedCells;
export declare const getSelectedRow: (state: EditorState<any>) => SelectedCells;
export declare const containsTable: (view: EditorView, slice: Slice) => boolean;
export declare const containsTableHeader: (view: EditorView, table: Node) => boolean;