@omnia/fx-models
Version:
Provide Omnia Fx Models Stuffs.
31 lines (30 loc) • 1.1 kB
TypeScript
import { ParseOptions } from "prosemirror-model";
import { EditorProps } from 'prosemirror-view';
import { IMark, INodeExtension, IMarkExtension, IPlugin } from './EditorExtension';
export interface TipTapEditor extends TipTapEditorProperties, TipTapEditorMethods {
}
export interface TipTapEditorProperties {
content?: object | string;
editorProps?: EditorProps;
editable?: boolean;
autoFocus?: boolean;
extensions?: Array<Node | IMark | IPlugin | INodeExtension | IMarkExtension>;
useBuiltInExtensions?: boolean;
dropCursor?: any;
parseOptions?: ParseOptions;
onInit?: () => void;
onFocus?: () => void;
onBlur?: () => void;
onUpdate?: () => void;
}
export interface TipTapEditorMethods {
setContent(content: string, emitUpdate?: boolean, parseOptions?: ParseOptions): any;
clearContent(emitUpdate?: boolean): any;
setOptions(options: object): any;
registerPlugin(plugin: Plugin): any;
getJSON(emitUpdate?: boolean): any;
getHTML(): string;
focus(): any;
blur(): any;
destroy(): any;
}