UNPKG

@zodiac-ui/editor

Version:

A rich text editor for Angular based on `@atlaskit/editor-core`.

19 lines (18 loc) 878 B
import { EditorState, Plugin, PluginKey } from "prosemirror-state"; import { EditorPlugin } from "../../lib/interfaces/editor-plugin"; export interface CodeBlockState { element?: HTMLElement; toolbarVisible?: boolean | undefined; language?: string; } export declare const getPluginState: (state: EditorState<any>) => CodeBlockState; export declare const setPluginState: (stateProps: Object) => (state: EditorState<any>, dispatch: (tr: any) => void) => boolean; export declare type CodeBlockStateSubscriber = (state: CodeBlockState) => any; export declare const pluginKey: PluginKey<any, any>; export declare const createPlugin: ({ dispatch }: { dispatch: any; }) => Plugin<any, any>; export interface CodeBlockOptions { enableKeybindingsForIDE?: boolean; } export declare function codeBlockPlugin(options?: CodeBlockOptions): EditorPlugin;