@atlaskit/editor-plugin-show-diff
Version:
ShowDiff plugin for @atlaskit/editor-core
15 lines (14 loc) • 743 B
TypeScript
import type { EditorState } from 'prosemirror-state';
import type { DeletedDiffWidget } from '../showDiffPluginType';
/**
* The rendered deleted-content widgets in `editorState`, optionally restricted to `[from, to]`,
* ordered by position. Deleted content is rendered as widget decorations rather than document
* nodes, so this is how the element and the position it is anchored at are recovered.
*
* Kept internal and surfaced only through the `getDeletedWidgets` plugin action, so consumers never
* receive the plugin key or the decoration set (which would let them mutate plugin behaviour).
*/
export declare const getDeletedWidgets: (editorState: EditorState, range?: {
from: number;
to: number;
}) => DeletedDiffWidget[];