@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
29 lines (28 loc) • 962 B
TypeScript
import { EditorState, EditorView, Schema, Plugin, PluginKey } from '../../prosemirror';
export declare type StateChangeHandler = (state: ListsState) => any;
/**
*
* Plugin State
*
*/
export declare class ListsState {
private changeHandlers;
bulletListActive: boolean;
bulletListDisabled: boolean;
bulletListHidden: boolean;
orderedListActive: boolean;
orderedListDisabled: boolean;
orderedListHidden: boolean;
constructor(state: EditorState<any>);
subscribe(cb: StateChangeHandler): void;
unsubscribe(cb: StateChangeHandler): void;
toggleBulletList(view: EditorView): boolean;
toggleOrderedList(view: EditorView): boolean;
update(newEditorState: any): void;
private triggerOnChange();
private isWrappingPossible(nodeType, state);
}
export declare const stateKey: PluginKey;
export declare const plugin: Plugin;
declare const plugins: (schema: Schema<any, any>) => Plugin[];
export default plugins;