UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

32 lines (31 loc) 1.93 kB
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics'; import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher'; import type { PortalProviderAPI } from '@atlaskit/editor-common/portal'; import type { GetEditorContainerWidth, GetEditorFeatureFlags } from '@atlaskit/editor-common/types'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { PluginInjectionAPI } from '../types'; import TableCell from './TableCell'; import TableRow from './TableRow'; import TableRowNativeStickyWithFallback from './TableRowNativeStickyWithFallback'; type TableViewOptions = { allowFixedColumnWidthOption?: boolean; dispatchAnalyticsEvent: DispatchAnalyticsEvent; eventDispatcher: EventDispatcher; getEditorContainerWidth: GetEditorContainerWidth; getEditorFeatureFlags: GetEditorFeatureFlags; isChromelessEditor?: boolean; isCommentEditor?: boolean; pluginInjectionApi?: PluginInjectionAPI; portalProviderAPI: PortalProviderAPI; }; export declare const tableView: (options: TableViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => import("prosemirror-view").NodeView; type TableCellViewOptions = { eventDispatcher: EventDispatcher; isDragAndDropEnabled?: boolean; pluginInjectionApi?: PluginInjectionAPI; }; export declare const tableCellView: (options: TableCellViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => TableCell; export declare const tableHeaderView: (options: TableCellViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => TableCell; export declare const tableRowView: (options: TableCellViewOptions) => (node: PMNode, view: EditorView, getPos: () => number | undefined) => TableRow | TableRowNativeStickyWithFallback; export {};