UNPKG

@atlaskit/editor-plugin-annotation

Version:

Annotation plugin for @atlaskit/editor-core

13 lines (12 loc) 1.51 kB
import { type AnnotationId } from '@atlaskit/adf-schema'; import type { ApplyDraftResult, ClearAnnotationResult, ClearDraftResult, GetDraftResult, HoverAnnotationResult, SelectAnnotationResult, StartDraftResult } from '@atlaskit/editor-common/annotation'; import type { EditorView } from '@atlaskit/editor-prosemirror/view'; import type { InlineCommentPluginOptions } from './types'; export declare const allowAnnotation: (editorView: EditorView, _options: InlineCommentPluginOptions) => () => boolean; export declare const startDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => StartDraftResult; export declare const clearDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => () => ClearDraftResult; export declare const applyDraft: (editorView: EditorView, options: InlineCommentPluginOptions) => (id: AnnotationId) => ApplyDraftResult; export declare const getDraft: (editorView: EditorView, _options: InlineCommentPluginOptions) => () => GetDraftResult; export declare const setIsAnnotationSelected: (editorView: EditorView, options: InlineCommentPluginOptions) => (id: AnnotationId, isSelected: boolean) => SelectAnnotationResult; export declare const setIsAnnotationHovered: (editorView: EditorView, _options: InlineCommentPluginOptions) => (id: AnnotationId, isHovered: boolean) => HoverAnnotationResult; export declare const clearAnnotation: (editorView: EditorView, options: InlineCommentPluginOptions) => (id: AnnotationId) => ClearAnnotationResult;