import React from 'react'; import SimpleMDE from 'easymde'; import { Editor, EditorEventMap, Position, EditorChange, KeyMap } from 'codemirror'; declare type DOMEvent = "mousedown" | "dblclick" | "touchstart" | "contextmenu" | "keydown" | "keypress" | "keyup" | "cut" | "copy" | "paste" | "dragstart" | "dragenter" | "dragover" | "dragleave" | "drop"; declare type CopyEvents = { [TKey in string & DOMEvent & keyof DocumentAndElementEventHandlersEventMap as `${TKey}`]?: (instance: Editor, event: DocumentAndElementEventHandlersEventMap[TKey]) => void; }; declare type GlobalEvents = { [TKey in string & DOMEvent & keyof GlobalEventHandlersEventMap as `${TKey}`]?: (instance: Editor, event: GlobalEventHandlersEventMap[TKey]) => void; }; declare type DefaultEvent = (instance: Editor, ...args: any[]) => void; declare type IndexEventsSignature = { [key: string]: DefaultEvent | undefined; }; interface SimpleMdeToCodemirrorEvents extends CopyEvents, GlobalEvents, IndexEventsSignature, Partial { } declare type GetMdeInstance = (instance: SimpleMDE) => void; declare type GetCodemirrorInstance = (instance: Editor) => void; declare type GetLineAndCursor = (instance: Position) => void; interface SimpleMDEReactProps extends Omit, "onChange"> { id?: string; onChange?: (value: string, changeObject?: EditorChange) => void; value?: string; extraKeys?: KeyMap; options?: SimpleMDE.Options; events?: SimpleMdeToCodemirrorEvents; getMdeInstance?: GetMdeInstance; getCodemirrorInstance?: GetCodemirrorInstance; getLineAndCursor?: GetLineAndCursor; placeholder?: string; textareaProps?: Omit, "id" | "style" | "placeholder">; } declare const SimpleMdeReact: React.ForwardRefExoticComponent>; export { CopyEvents, DOMEvent, DefaultEvent, GetCodemirrorInstance, GetLineAndCursor, GetMdeInstance, GlobalEvents, IndexEventsSignature, SimpleMDEReactProps, SimpleMdeReact, SimpleMdeToCodemirrorEvents, SimpleMdeReact as default };