@atlaskit/editor-core
Version:
A package contains Atlassian editor core functionality
43 lines (42 loc) • 1.48 kB
TypeScript
/// <reference types="react" />
import { PureComponent } from 'react';
import { TextFormattingState } from '../../plugins/text-formatting';
import { ClearFormattingState } from '../../plugins/clear-formatting';
import { EditorView } from '../../prosemirror';
export interface Props {
isDisabled?: boolean;
editorView: EditorView;
pluginStateTextFormatting?: TextFormattingState | undefined;
pluginStateClearFormatting?: ClearFormattingState | undefined;
popupsMountPoint?: HTMLElement;
popupsBoundariesElement?: HTMLElement;
}
export interface State {
isOpen?: boolean;
underlineActive?: boolean;
underlineDisabled?: boolean;
underlineHidden?: boolean;
strikethroughActive?: boolean;
strikethroughDisabled?: boolean;
strikeHidden?: boolean;
subscriptActive?: boolean;
subscriptDisabled?: boolean;
subscriptHidden?: boolean;
superscriptActive?: boolean;
superscriptDisabled?: boolean;
superscriptHidden?: boolean;
clearFormattingDisabled?: boolean;
}
export default class ToolbarAdvancedTextFormatting extends PureComponent<Props, State> {
state: State;
componentDidMount(): void;
componentWillUnmount(): void;
private onOpenChange;
private handleTriggerClick;
render(): JSX.Element;
private createItems;
private addRecordToItems;
private handlePluginStateTextFormattingChange;
private handlePluginStateClearFormattingChange;
private onItemActivated;
}