UNPKG

@atlaskit/editor-plugin-mentions

Version:

Mentions plugin for @atlaskit/editor-core

34 lines (33 loc) 1.2 kB
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { NodeView } from '@atlaskit/editor-prosemirror/view'; import type { MentionsPlugin } from '../mentionsPluginType'; import type { MentionPluginOptions } from '../types'; interface MentionNodeViewProps { api: ExtractInjectionAPI<MentionsPlugin> | undefined; options?: MentionPluginOptions; portalProviderAPI: PortalProviderAPI; } export declare class MentionNodeView implements NodeView { private state; dom: Node; domElement: HTMLElement | undefined; contentDOM: HTMLElement | undefined; private config; private node; private cleanup; private destroyProfileCard; private removeProfileCard; private mentionPrimitiveElement; constructor(node: PMNode, config: MentionNodeViewProps); private setClassList; private setTextContent; private shouldHighlightMention; private updateState; private nodeIsEqual; update(node: PMNode): boolean; destroy(): void; deselectNode(): void; } export {};