UNPKG

@atlaskit/editor-common

Version:

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

35 lines (34 loc) 1.59 kB
import { Component } from 'react'; import { type ADFEntity } from '@atlaskit/adf-utils/types'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { EventDispatcher } from '../event-dispatcher'; import type { ExtensionHandlers, ReferenceEntity } from '../extensions'; import { ProviderFactory } from '../provider-factory'; import type { ProsemirrorGetPosHandler } from '../react-node-view'; import type { EditorAppearance } from '../types'; import type { ExtensionsPluginInjectionAPI, MacroInteractionDesignFeatureFlags } from './types'; export interface Props { editorView: EditorView; node: PMNode; getPos: ProsemirrorGetPosHandler; providerFactory?: ProviderFactory; handleContentDOMRef: (node: HTMLElement | null) => void; extensionHandlers: ExtensionHandlers; references?: ReferenceEntity[]; editorAppearance?: EditorAppearance; pluginInjectionApi: ExtensionsPluginInjectionAPI; eventDispatcher?: EventDispatcher; macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags; showLivePagesBodiedMacrosRendererView?: (node: ADFEntity) => boolean; showUpdatedLivePages1PBodiedExtensionUI?: (node: ADFEntity) => boolean; rendererExtensionHandlers?: ExtensionHandlers; } export declare class Extension extends Component<Props, any> { static displayName: string; private providerFactory; constructor(props: Props); componentWillUnmount(): void; private renderWithProvider; render(): JSX.Element; }