@atlaskit/editor-plugin-selection
Version:
Selection plugin for @atlaskit/editor-core
18 lines (17 loc) • 815 B
TypeScript
import type { SelectionSharedState } from '@atlaskit/editor-common/selection';
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
import type { EditorSelectionAPI, SelectionPluginOptions } from './types';
export type SelectionPlugin = NextEditorPlugin<'selection', {
actions: EditorSelectionAPI;
commands: {
clearManualSelection: () => EditorCommand;
displayGapCursor: (toggle: boolean) => EditorCommand;
setManualSelection: (anchor: number, head: number) => EditorCommand;
};
dependencies: [
OptionalPlugin<InteractionPlugin>
];
pluginConfiguration: SelectionPluginOptions | undefined;
sharedState: SelectionSharedState;
}>;