import type { CompletionSource } from '@codemirror/autocomplete'; import type { ChangeEvent, CustomIcon, Footers, GetCatalogEvent, HtmlChangedEvent, MdHeadingId, SaveEvent, Themes, ToolbarNames, UploadImgEvent } from 'md-editor-v3'; import type { Component, CSSProperties, VNode } from 'vue'; import type { QdUploadProps } from '../upload/types'; export type QdMdEditorProps = { onSave?: SaveEvent; onUploadImg?: UploadImgEvent; pageFullscreen?: boolean; preview?: boolean; htmlPreview?: boolean; toolbars?: ToolbarNames[]; floatingToolbars?: ToolbarNames[]; toolbarsExclude?: ToolbarNames[]; disabledPrettier?: boolean; tabWidth?: number; tableShape?: number[]; placeholder?: string; defToolbars?: string | VNode; onError?: ErrorEvent; footers?: Footers; scrollAuto?: boolean; defFooters?: string | VNode; disabledUploadImg?: boolean; autoFocus?: boolean; disabled?: boolean; readonly?: boolean; maxlength?: number; autoDetectCode?: boolean; onBlur?: (event: FocusEvent) => void; onFocus?: (event: FocusEvent) => void; completions?: CompletionSource[]; showToolbarName?: boolean; onInput?: (event: Event) => void; onDrop?: (event: DragEvent) => void; inputBoxWidth?: string; oninputBoxWidthChange?: (width: string) => void; transformImgUrl?: (t: string) => string | Promise; catalogLayout?: 'fixed' | 'flat'; catalogMaxDepth?: number; modelValue?: string; onChange?: ChangeEvent; theme?: Themes; class?: StringConstructor; locale?: string; onHtmlChanged?: HtmlChangedEvent; onGetCatalog?: GetCatalogEvent; id?: string; showCodeRowNumber?: boolean; style?: CSSProperties; mdHeadingId?: MdHeadingId; sanitize?: (html: string) => string; disabledMermaid?: boolean; disabledKatex?: boolean; formatCopiedText?: (text: string) => string; codeStyleReverse?: boolean; codeStyleReverseList?: string[]; disabledHighlight?: boolean; disabledImgZoomIn?: boolean; customIcon?: CustomIcon; sanitizeMermaid?: (h: string) => Promise; codeFoldable?: boolean; autoFoldThreshold?: number; onRemount?: () => void; disabledEcharts?: boolean; previewComponent?: Component; } & Pick;