@atlaskit/editor-plugin-copy-button
Version:
editor-plugin-copy-button for @atlaskit/editor-core
17 lines (16 loc) • 1.33 kB
TypeScript
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
import type { ExtractInjectionAPI, Command, FloatingToolbarButton, FloatingToolbarItem, MarkOptions, NodeOptions } from '@atlaskit/editor-common/types';
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { CopyButtonPlugin } from '../copyButtonPluginType';
/**
* Performs the actions after a copy operation.
* - Sets the copied state in the editor state
* - Announces the copied message to the user
*/
export declare const afterCopy: (api?: ExtractInjectionAPI<CopyButtonPlugin>) => (message: string) => void;
export declare function getCopyButtonConfig(options: MarkOptions | NodeOptions, hoverDecoration: HoverDecorationHandler | undefined, editorAnalyticsApi: EditorAnalyticsAPI | undefined, api?: ExtractInjectionAPI<CopyButtonPlugin>): FloatingToolbarButton<Command>;
/**
* Process floatingToolbar items for copyButton
*/
export declare const processCopyButtonItems: (editorAnalyticsApi?: EditorAnalyticsAPI | undefined, api?: ExtractInjectionAPI<CopyButtonPlugin>) => (state: EditorState) => (items: Array<FloatingToolbarItem<Command>>, hoverDecoration: HoverDecorationHandler | undefined) => Array<FloatingToolbarItem<Command>>;