UNPKG

@atlaskit/editor-plugin-copy-button

Version:

editor-plugin-copy-button for @atlaskit/editor-core

13 lines (12 loc) • 1.41 kB
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api'; import type { Command, CommandDispatch } from '@atlaskit/editor-common/types/command'; import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin'; import type { HoverDecorationHandler } from '@atlaskit/editor-plugin-decorations/main'; 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;