@atlaskit/editor-plugin-show-diff
Version:
ShowDiff plugin for @atlaskit/editor-core
9 lines (8 loc) • 460 B
TypeScript
import type { EditorView, Decoration } from '@atlaskit/editor-prosemirror/view';
/**
* Schedules scrolling to the decoration at the given index after the next frame. Defaults to the
* first decoration when no index is provided.
*
* @returns A function that cancels the scheduled `requestAnimationFrame` if it has not run yet.
*/
export declare const scrollToDecoration: (view: EditorView, decorations: Decoration[], activeIndex?: number) => (() => void);