@atlaskit/editor-plugin-copy-button
Version:
editor-plugin-copy-button for @atlaskit/editor-core
12 lines (11 loc) • 1.32 kB
TypeScript
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
import type { ExtractInjectionAPI, Command, CommandDispatch } from '@atlaskit/editor-common/types';
import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations';
import type { MarkType, NodeType } from '@atlaskit/editor-prosemirror/model';
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
import type { CopyButtonPlugin } from '../copyButtonPluginType';
export declare function createToolbarCopyCommandForMark(markType: MarkType, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
export declare function getProvideMarkVisualFeedbackForCopyButtonCommand(markType: MarkType): (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
export declare function removeMarkVisualFeedbackForCopyButtonCommand(state: EditorState, dispatch: CommandDispatch | undefined): boolean;
export declare const createToolbarCopyCommandForNode: (nodeType: NodeType | Array<NodeType>, editorAnalyticsApi: EditorAnalyticsAPI | undefined, api: ExtractInjectionAPI<CopyButtonPlugin> | undefined, onClickMessage?: string) => Command;
export declare const resetCopiedState: (nodeType: NodeType | Array<NodeType>, hoverDecoration: HoverDecorationHandler | undefined, onMouseLeave?: Command) => Command;