UNPKG

@atlaskit/editor-plugin-tasks-and-decisions

Version:

Tasks and decisions plugin for @atlaskit/editor-core

38 lines (37 loc) 1.35 kB
import type { IntlShape } from 'react-intl'; import type { ExtractInjectionAPI, getPosHandlerNode } from '@atlaskit/editor-common/types'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view'; import type { TasksAndDecisionsPlugin } from '../tasksAndDecisionsPluginType'; interface TaskItemNodeViewOptions { api: ExtractInjectionAPI<TasksAndDecisionsPlugin> | undefined; intl: IntlShape; placeholder?: string; } export declare class TaskItemNodeView implements NodeView { dom: Node; domElement: HTMLElement | undefined; contentDOM: HTMLElement | undefined; private node; private view; private getPos; private api; private readonly intl; private unbindInputDom; private emptyContent; private input?; constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, { api, placeholder, intl }: TaskItemNodeViewOptions); private getContextIdentifierProvider; private getObjectAri; private handleOnClick; private handleOnChange; private isContentEmpty; private updatePlaceholder; update(node: PMNode): boolean; ignoreMutation(mutation: MutationRecord | { target: Node; type: 'selection'; }): boolean; destroy(): void; } export {};