UNPKG

@atlaskit/editor-common

Version:

A package that contains common classes and components for editor and renderer

33 lines (32 loc) 1.71 kB
/// <reference types="react" /> import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view'; import type { EventDispatcher } from '../event-dispatcher'; import type { ExtensionHandlers } from '../extensions'; import type { ProviderFactory } from '../provider-factory'; import type { ForwardRef, getPosHandler } from '../react-node-view'; import ReactNodeView from '../react-node-view'; import type { EditorAppearance } from '../types'; import type { PortalProviderAPI } from '../ui/PortalProvider'; import type { ExtensionsPluginInjectionAPI } from './types'; interface ExtensionNodeViewOptions { appearance?: EditorAppearance; } export declare class ExtensionNode extends ReactNodeView { ignoreMutation(mutation: MutationRecord | { type: 'selection'; target: Element; }): boolean; getContentDOM(): { dom: HTMLDivElement; } | undefined; render(props: { providerFactory: ProviderFactory; extensionHandlers: ExtensionHandlers; extensionNodeViewOptions?: ExtensionNodeViewOptions; pluginInjectionApi: ExtensionsPluginInjectionAPI; showMacroInteractionDesignUpdates: boolean; }, forwardRef: ForwardRef): JSX.Element; } export default function ExtensionNodeView(portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, extensionNodeViewOptions: ExtensionNodeViewOptions, pluginInjectionApi: ExtensionsPluginInjectionAPI, showMacroInteractionDesignUpdates?: boolean): (node: PmNode, view: EditorView, getPos: getPosHandler) => NodeView; export {};