UNPKG

@atlaskit/editor-plugin-block-type

Version:

BlockType plugin for @atlaskit/editor-core

16 lines (15 loc) 930 B
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types'; import { PluginKey } from '@atlaskit/editor-prosemirror/state'; import type { BlockTypePlugin } from '../blockTypePluginType'; import type { BlockType } from './types'; export type BlockTypeState = { availableBlockTypes: BlockType[]; availableBlockTypesInDropdown: BlockType[]; availableWrapperBlockTypes: BlockType[]; blockTypesDisabled: boolean; currentBlockType: BlockType; formattingIsPresent?: boolean; }; export declare const pluginKey: PluginKey<BlockTypeState>; export declare const createPlugin: (editorAPI: ExtractInjectionAPI<BlockTypePlugin> | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean, includeBlockQuoteAsTextstyleOption?: boolean, allowFontSize?: boolean) => SafePlugin<BlockTypeState>;