import { CssValue } from '@platform/css'; import { EditorState } from 'prosemirror-state'; import { EditorView } from 'prosemirror-view'; import * as React from 'react'; import { Subject } from 'rxjs'; import { IEditorStyles, markdown, t } from '../../common'; export declare type DocSchema = any; export declare type ITextEditorProps = { value?: string; format?: 'MARKDOWN'; events$?: Subject; focusOnLoad?: boolean; selectAllOnLoad?: boolean; cursorToEndOnLoad?: boolean; className?: string; style?: CssValue; editorStyle?: CssValue; contentStyle?: Partial; fontSize?: number | string; allowEnter?: boolean; allowMetaEnter?: boolean; allowHeadings?: boolean; }; export declare class TextEditor extends React.PureComponent { static markdown: typeof markdown; static size(el?: HTMLElement): t.IEditorSize; private elBlurTarget; private elBlurTargetRef; private elEditor; private elEditorRef; private elMeasure; private elMeasureRef; private view; private viewMeasure; private _prevState; private _prevSize; private unmounted$; private keypress$; private _events$; events$: import("rxjs").Observable; private readonly modifierKeys; componentDidMount(): void; componentDidUpdate(prev: ITextEditorProps): void; componentWillUnmount(): void; get isDisposed(): () => void; get isFocused(): boolean; get value(): string; get editor(): { view: EditorView; state: EditorState; }; get size(): t.IEditorSize; init(value: string): void; load(value: string): void; focus(isFocused?: boolean): this; blur(): this; selectAll(): this; cursorToStart(): this; cursorToEnd(): this; private updateStyles; render(): JSX.Element; private handleFocus; private handleKeyDown; private dispatch; private fire; private fireChanged; private handleClick; }