@atlaskit/editor-plugin-floating-toolbar
Version:
Floating toolbar plugin for @atlaskit/editor-core
95 lines (75 loc) • 2.78 kB
Markdown
<!-- API Report Version: 2.3 -->
## API Report File for "@atlaskit/editor-plugin-floating-toolbar"
> 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 { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
import type { CopyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
import type { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
// @public (undocumented)
export type ConfigWithNodeInfo = {
config: FloatingToolbarConfig | undefined;
pos: number;
node: Node_2;
};
// @public
export type FloatingToolbarPlugin = NextEditorPlugin<
'floatingToolbar',
{
dependencies: [
OptionalPlugin<FeatureFlagsPlugin>,
DecorationsPlugin,
OptionalPlugin<ContextPanelPlugin>,
OptionalPlugin<ExtensionPlugin>,
CopyButtonPlugin,
EditorDisabledPlugin,
];
actions: {
forceFocusSelector: ForceFocusSelector;
};
sharedState:
| undefined
| {
configWithNodeInfo: ConfigWithNodeInfo | undefined;
floatingToolbarData: FloatingToolbarPluginData | undefined;
};
}
>;
// @public (undocumented)
export const floatingToolbarPlugin: FloatingToolbarPlugin;
// @public (undocumented)
export type FloatingToolbarPluginData = {
confirmDialogForItem?: number;
};
// @public (undocumented)
export type FloatingToolbarPluginState = {
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
};
// @public (undocumented)
export type ForceFocusSelector = (selector: null | string) => (tr: Transaction) => 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-->