UNPKG

@atlaskit/editor-plugin-selection

Version:

Selection plugin for @atlaskit/editor-core

74 lines (55 loc) 2.12 kB
<!-- API Report Version: 2.3 --> ## API Report File for "@atlaskit/editor-plugin-selection" > Do not edit this file. This report is auto-generated using > [API Extractor](https://api-extractor.com/). > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports) ### Table of contents - [Main Entry Types](#main-entry-types) - [Peer Dependencies](#peer-dependencies) ### Main Entry Types <!--SECTION START: Main Entry Types--> ```ts import type { EditorCommand } from '@atlaskit/editor-common/types'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types'; import type { NextEditorPlugin } from '@atlaskit/editor-common/types'; import { RelativeSelectionPos } from '@atlaskit/editor-common/selection'; import type { Selection as Selection_2 } from '@atlaskit/editor-prosemirror/state'; import type { SelectionSharedState } from '@atlaskit/editor-common/selection'; import type { Transaction } from '@atlaskit/editor-prosemirror/state'; // @public (undocumented) export type EditorSelectionAPI = { selectNearNode: SetSelectionRelativeToNode; }; // @public (undocumented) export type SelectionPlugin = NextEditorPlugin< 'selection', { pluginConfiguration: SelectionPluginOptions | undefined; actions: EditorSelectionAPI; commands: { displayGapCursor: (toggle: boolean) => EditorCommand; }; sharedState: SelectionSharedState; } >; // @public (undocumented) export const selectionPlugin: SelectionPlugin; // @public (undocumented) interface SelectionPluginOptions extends LongPressSelectionPluginOptions {} // @public (undocumented) export type SetSelectionRelativeToNode = (props: { selectionRelativeToNode?: RelativeSelectionPos; selection?: Selection_2 | null; }) => (state: EditorState) => Transaction; // (No @packageDocumentation comment for this package) ``` <!--SECTION END: Main Entry Types--> ### Peer Dependencies <!--SECTION START: Peer Dependencies--> ```json { "react": "^16.8.0" } ``` <!--SECTION END: Peer Dependencies-->