@@ -257,6 +257,7 @@ export interface IMarkdownEditor extends ReactCodeMirrorProps {
257257import React from ' react' ;
258258import { ReactCodeMirrorRef } from ' @uiw/react-codemirror' ;
259259import { MarkdownPreviewProps , MarkdownPreviewRef } from ' @uiw/react-markdown-preview' ;
260+ export * from ' @uiw/react-markdown-preview' ;
260261export interface ToolBarProps {
261262 editor: React .RefObject <ReactCodeMirrorRef >;
262263 preview: React .RefObject <HTMLDivElement >;
@@ -276,6 +277,16 @@ export interface IToolBarProps<T = keyof typeof defaultCommands | ICommand> exte
276277 toolbars? : T [];
277278 onClick? : (type : string ) => void ;
278279}
280+ declare const MarkdownEditor: MarkdownEditorComponent ;
281+ declare type MarkdownEditorComponent = React .FC <React .PropsWithRef <IMarkdownEditor >> & {
282+ Markdown: typeof MarkdownPreview ;
283+ };
284+ export default MarkdownEditor ;
285+ ```
286+
287+ ``` ts
288+ import { ReactCodeMirrorRef } from ' @uiw/react-codemirror' ;
289+ import { MarkdownPreviewProps , MarkdownPreviewRef } from ' @uiw/react-markdown-preview' ;
279290export declare type ButtonHandle = (command : ICommand , props : IMarkdownEditor , options : ToolBarProps ) => JSX .Element ;
280291export declare type ICommand = {
281292 icon? : React .ReactElement ;
@@ -285,27 +296,26 @@ export declare type ICommand = {
285296 execute? : (editor : ReactCodeMirrorRef ) => void ;
286297};
287298export declare const defaultCommands: {
299+ undo: ICommand ;
300+ redo: ICommand ;
288301 bold: ICommand ;
289302 italic: ICommand ;
290303 header: ICommand ;
291304 strike: ICommand ;
292305 underline: ICommand ;
306+ quote: ICommand ;
293307 olist: ICommand ;
294308 ulist: ICommand ;
295- link: ICommand ;
296309 todo: ICommand ;
310+ link: ICommand ;
297311 image: ICommand ;
298312 fullscreen: ICommand ;
299313 preview: ICommand ;
300314};
301315export declare const getCommands: () => ICommand [];
302316export declare const getModeCommands: () => ICommand [];
317+ export declare const defaultTheme: import (" @codemirror/state" ).Extension ;
303318
304- declare const MarkdownEditor: MarkdownEditorComponent ;
305- declare type MarkdownEditorComponent = React .FC <React .PropsWithRef <IMarkdownEditor >> & {
306- Markdown: typeof MarkdownPreview ;
307- };
308- export default MarkdownEditor ;
309319```
310320
311321### Development
0 commit comments