@atlaskit/editor-plugin-breakout
Version:
Breakout plugin for @atlaskit/editor-core
34 lines (33 loc) • 1.65 kB
TypeScript
import type { IntlShape } from 'react-intl';
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
import type { Mark } from '@atlaskit/editor-prosemirror/model';
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
import type { BreakoutPlugin } from '../breakoutPluginType';
export declare const LOCAL_RESIZE_PROPERTY = "--local-resizing-width";
export declare class ResizingMarkView implements NodeView {
dom: HTMLElement;
contentDOM: HTMLElement;
view: EditorView;
mark: Mark;
destroyFn: ((isChangeToViewMode?: boolean) => void) | undefined;
intl: IntlShape;
nodeViewPortalProviderAPI: PortalProviderAPI;
unsubscribeToViewModeChange: (() => void) | undefined;
isResizingInitialised: boolean;
/**
* Wrap node view in a resizing mark view
* @param {Mark} mark - The breakout mark to resize
* @param {EditorView} view - The editor view
* @param {ExtractInjectionAPI<BreakoutPlugin> | undefined} api - The pluginInjectionAPI
* @param {Function} getIntl - () => IntlShape
* @param {PortalProviderAPI} - The nodeViewPortalProviderAPI
* @example
* ```ts
* ```
*/
constructor(mark: Mark, view: EditorView, api: ExtractInjectionAPI<BreakoutPlugin> | undefined, getIntl: () => IntlShape, nodeViewPortalProviderAPI: PortalProviderAPI);
setupResizerCallbacks(dom: HTMLElement, contentDOM: HTMLElement, view: EditorView, mark: Mark, api?: ExtractInjectionAPI<BreakoutPlugin>): void;
ignoreMutation(): boolean;
destroy(): void;
}