UNPKG

@atlaskit/editor-plugin-scroll-into-view

Version:

Scroll-into-view plugin for @atlaskit/editor-core

14 lines (13 loc) 683 B
import { PluginKey } from '@atlaskit/editor-prosemirror/state'; import type { ScrollIntoViewPlugin } from './scrollIntoViewPluginType'; /** * Plugin to scroll the user's selection into view whenever the user updates * the document eg. inserting, deleting, formatting * * Behaviour is on by default, can be explicitly opted out of for a transaction by * setting scrollIntoView=false meta * We ignore collab transactions, appended transactions, transactions without steps, * transactions with addToHistory=false meta and typeahead trigger transactions */ export declare const scrollIntoViewPluginKey: PluginKey; export declare const scrollIntoViewPlugin: ScrollIntoViewPlugin;