/// import { AnalyticsHandler, ContextName, ProseMirror } from 'ak-editor-core'; import { PureComponent } from 'react'; export interface Props { context?: ContextName; isExpandedByDefault?: boolean; defaultValue?: string; onCancel?: (editor?: Editor) => void; onChange?: (editor?: Editor) => void; onSave?: (editor?: Editor) => void; placeholder?: string; analyticsHandler?: AnalyticsHandler; } export interface State { pm?: ProseMirror; isExpanded?: boolean; } export default class Editor extends PureComponent { state: State; constructor(props: Props); /** * Focus the content region of the editor. */ focus(): void; /** * Clear the content of the editor, making it an empty document. */ clear(): void; /** * Check if the user has entered any significant content. * (i.e. text) */ isDirty(): boolean; /** * The current value of the editor, encoded as HTML. */ readonly value: string | undefined; render(): JSX.Element; private handleCancel; private handleChange; private handleSave; private handleRef; }