UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

37 lines (36 loc) • 1.59 kB
import type { IntlShape } from 'react-intl'; import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics/types/dispatch-analytics-event'; import type { PortalProviderAPI } from '@atlaskit/editor-common/common'; import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher'; import type { GetEditorContainerWidth } from '@atlaskit/editor-common/types/editor-container-width'; import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types/feature-flags'; import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { PluginInjectionAPI } from '../types'; export type TableOptions = { isChromelessEditor?: boolean; isCommentEditor?: boolean; isFullWidthModeEnabled?: boolean; isTableScalingEnabled?: boolean; shouldUseIncreasedScalingPercent?: boolean; wasFullWidthModeEnabled?: boolean; }; export interface Props { allowColumnResizing?: boolean; allowControls?: boolean; allowFixedColumnWidthOption?: boolean; allowTableAlignment?: boolean; allowTableResizing?: boolean; cellMinWidth?: number; dispatchAnalyticsEvent: DispatchAnalyticsEvent; eventDispatcher: EventDispatcher; getEditorContainerWidth: GetEditorContainerWidth; getEditorFeatureFlags: GetEditorFeatureFlags; getPos: () => number | undefined; intl?: IntlShape; node: PmNode; options?: TableOptions; pluginInjectionApi?: PluginInjectionAPI; portalProviderAPI: PortalProviderAPI; view: EditorView; }