@atlaskit/editor-plugin-block-controls
Version:
Block controls plugin for @atlaskit/editor-core
23 lines (22 loc) • 1.11 kB
TypeScript
import { jsx } from '@emotion/react';
import type { IntlShape } from 'react-intl';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
import type { BlockControlsPlugin } from '../blockControlsPluginType';
import type { AnchorRectCache } from '../pm-plugins/utils/anchor-utils';
export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_OFFSET = "--editor-block-controls-drop-indicator-offset";
export declare const EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_GAP = "--editor-block-controls-drop-indicator-gap";
export type DropTargetStyle = 'default' | 'remainingHeight';
export type DropTargetProps = {
api: ExtractInjectionAPI<BlockControlsPlugin> | undefined;
dropTargetStyle?: DropTargetStyle;
formatMessage?: IntlShape['formatMessage'];
getPos: () => number | undefined;
nextNode?: PMNode;
parentNode?: PMNode;
prevNode?: PMNode;
};
export declare const DropTarget: (props: DropTargetProps & {
anchorRectCache?: AnchorRectCache;
isSameLayout?: boolean;
}) => jsx.JSX.Element;