Interface: MDXEditorMethods

The interface for the MDXEditor object reference.

Example

 const mdxEditorRef = React.useRef<MDXEditorMethods>(null)
 <MDXEditor ref={mdxEditorRef} />

Properties

PropertyTypeDescription
focus(callbackFn?: () => void, opts?: object) => voidSets focus on input
getContentEditableHTML() => stringgets the underlying Lexical contentEditable HTML content
getMarkdown() => stringGets the current markdown value.
getSelectionMarkdown() => stringGets the markdown representation of the current selection. Returns an empty string if there is no selection, if selection is collapsed, or if editor is in source/diff mode.
insertMarkdown(value: string) => voidInserts markdown at the current cursor position. Use the focus if necessary.
setMarkdown(value: string) => voidUpdates the markdown value of the editor.