UNPKG

@atlaskit/editor-plugin-show-diff

Version:

ShowDiff plugin for @atlaskit/editor-core

13 lines (12 loc) • 695 B
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types'; import type { EditorView, Decoration } from '@atlaskit/editor-prosemirror/view'; import type { ShowDiffPlugin } from '../showDiffPluginType'; type PluginInjectionAPI = ExtractInjectionAPI<ShowDiffPlugin>; /** * 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, api?: PluginInjectionAPI) => (() => void); export {};