UNPKG

@atlaskit/editor-plugin-extension

Version:

editor-plugin-extension plugin for @atlaskit/editor-core

38 lines (37 loc) 1.98 kB
import type { IntlShape } from 'react-intl'; import { type ExtensionProvider } from '@atlaskit/editor-common/extensions'; import type { Command, FloatingToolbarHandler, PublicPluginAPI } from '@atlaskit/editor-common/types'; import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics'; import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity'; 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 { MentionsPlugin } from '@atlaskit/editor-plugin-mentions'; import type { EditorState } from '@atlaskit/editor-prosemirror/state'; import type { ExtensionPluginOptions } from '../extensionPluginType'; /** * Creates a function that copies the text content of the unsupported content extension to the clipboard * if the current selected extension is an unsupported content extension. */ export declare const createOnClickCopyButton: ({ formatMessage, extensionApi, extensionProvider, getUnsupportedContent, state, locale, }: { extensionApi: GetToolbarConfigProps["extensionApi"]; extensionProvider?: ExtensionProvider; formatMessage: IntlShape["formatMessage"]; getUnsupportedContent?: ExtensionPluginOptions["getUnsupportedContent"]; locale: string; state: EditorState; }) => Command | undefined; interface GetToolbarConfigProps { breakoutEnabled: boolean | undefined; extensionApi?: PublicPluginAPI<[ ContextPanelPlugin, AnalyticsPlugin, DecorationsPlugin, ConnectivityPlugin, MentionsPlugin, CopyButtonPlugin ]> | undefined; getUnsupportedContent?: ExtensionPluginOptions['getUnsupportedContent']; } export declare const getToolbarConfig: ({ breakoutEnabled, extensionApi, getUnsupportedContent, }: GetToolbarConfigProps) => FloatingToolbarHandler; export {};