UNPKG

@atlaskit/editor-plugin-code-block

Version:

Code block plugin for @atlaskit/editor-core

17 lines (16 loc) 865 B
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin'; import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model'; import { PluginKey } from '@atlaskit/editor-prosemirror/state'; import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state'; export declare const copySelectionPluginKey: PluginKey; type CodeBlockCopySelectionPluginState = { codeBlockNode?: PMNode; decorationStartAndEnd?: [ start: number, end: number ]; }; export declare function codeBlockCopySelectionPlugin(): SafePlugin<CodeBlockCopySelectionPluginState>; export declare function provideVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean; export declare function removeVisualFeedbackForCopyButton(state: EditorState, dispatch?: (tr: Transaction) => void): boolean; export {};