UNPKG

@omnia/fx-models

Version:
42 lines (41 loc) 1.4 kB
import { ParseOptions } from "prosemirror-model"; import { EditorProps } from "prosemirror-view"; import { GuidValue } from "@omnia/fx-models/internal-do-not-import-from-here/shared/models"; import { IMark, INodeExtension, IMarkExtension, IPlugin } from "./EditorExtension"; export interface TipTapEditor extends TipTapEditorProperties, TipTapEditorMethods { omniaRTFId: GuidValue; } 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?: ({ event, state, view }: { event: any; state: any; view: any; }) => void; onBlur?: ({ event, state, view }: { event: any; state: any; view: any; }) => void; onUpdate?: () => void; onPaste?: (e: any) => 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; }