import { Plugin, ProseMirror, Schema } from '../../prosemirror'; import { EmMarkType, MonoMarkType, StrikeMarkType, StrongMarkType, SubSupMarkType, UnderlineMarkType } from '../../schema'; export declare type StateChangeHandler = (state: TextFormattingState) => any; export declare type BlockTypeStateSubscriber = (state: TextFormattingState) => void; export declare class TextFormattingState { private changeHandlers; private pm; emActive: boolean; emDisabled: boolean; emHidden: boolean; monoActive: boolean; monoDisabled: boolean; monoHidden: boolean; underlineActive: boolean; underlineDisabled: boolean; underlineHidden: boolean; strikeActive: boolean; strikeDisabled: boolean; strikeHidden: boolean; strongActive: boolean; strongDisabled: boolean; strongHidden: boolean; superscriptActive: boolean; superscriptDisabled: boolean; superscriptHidden: boolean; subscriptActive: boolean; subscriptDisabled: boolean; subscriptHidden: boolean; constructor(pm: PM); toggleEm(): void; toggleMono(): void; toggleStrike(): void; toggleStrong(): void; toggleSuperscript(): void; toggleSubscript(): void; toggleUnderline(): void; subscribe(cb: StateChangeHandler): void; unsubscribe(cb: StateChangeHandler): void; private update(); private addKeymap(); /** * Determine if a mark of a specific type exists anywhere in the selection. */ private anyMarkActive(markType); /** * Determine if a mark (with specific attribute values) exists anywhere in the selection. */ private markActive(mark); private toggleMark(markType, attrs?); } declare var _default: Plugin; export default _default; export interface S extends Schema { marks: { em?: EmMarkType; mono?: MonoMarkType; strike?: StrikeMarkType; strong?: StrongMarkType; subsup?: SubSupMarkType; u?: UnderlineMarkType; }; } export interface PM extends ProseMirror { schema: S; }