UNPKG

@atlaskit/editor-core

Version:

A package contains Atlassian editor core functionality

30 lines (29 loc) 1.17 kB
import { EditorState, PluginKey, EditorView, Schema, NodeViewDesc, Plugin } from '../../prosemirror'; export interface PanelType { panelType: 'info' | 'note' | 'tip' | 'warning'; } export declare const availablePanelType: { panelType: string; }[]; export declare class PanelState { private state; private activeNode; private changeHandlers; element?: HTMLElement | undefined; activePanelType?: string | undefined; toolbarVisible?: boolean | undefined; editorFocused: boolean; constructor(state: EditorState<any>); updateEditorFocused(editorFocused: boolean): void; changePanelType(view: EditorView, panelType: PanelType): void; removePanel(view: EditorView): void; subscribe(cb: PanelStateSubscriber): void; unsubscribe(cb: PanelStateSubscriber): void; update(state: EditorState<any>, docView: NodeViewDesc, domEvent?: boolean): void; private getActivePanel(docView); private getDomElement(docView); } export declare type PanelStateSubscriber = (state: PanelState) => any; export declare const stateKey: PluginKey; declare const plugins: (schema: Schema<any, any>) => Plugin[]; export default plugins;