feat: add vditor locally

This commit is contained in:
merlin
2025-11-12 14:39:23 +08:00
parent 16e8fd2d65
commit 4e21c62e26
532 changed files with 43947 additions and 38 deletions

View File

@@ -0,0 +1 @@
export declare const SMILESRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;

View File

@@ -0,0 +1 @@
export declare const abcRender: (element?: (HTMLElement | Document), cdn?: string) => void;

View File

@@ -0,0 +1,41 @@
export declare const mathRenderAdapter: {
getCode: (el: Element) => string;
getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const SMILESRenderAdapter: {
getCode: (el: Element) => string;
getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const mermaidRenderAdapter: {
/** 不仅要返回code并且需要将 code 设置为 el 的 innerHTML */
getCode: (el: Element) => string;
getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const markmapRenderAdapter: {
getCode: (el: Element) => string;
getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const mindmapRenderAdapter: {
getCode: (el: Element) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const chartRenderAdapter: {
getCode: (el: HTMLElement) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const abcRenderAdapter: {
getCode: (el: Element) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const graphvizRenderAdapter: {
getCode: (el: Element) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const flowchartRenderAdapter: {
getCode: (el: Element) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};
export declare const plantumlRenderAdapter: {
getCode: (el: Element) => string;
getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
};

View File

@@ -0,0 +1 @@
export declare const anchorRender: (type: number) => void;

View File

@@ -0,0 +1 @@
export declare const chartRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;

View File

@@ -0,0 +1 @@
export declare const codeRender: (element: HTMLElement, option?: IHljs) => void;

View File

@@ -0,0 +1 @@
export declare const flowchartRender: (element: HTMLElement, cdn?: string) => void;

View File

@@ -0,0 +1 @@
export declare const getHTML: (vditor: IVditor) => string;

View File

@@ -0,0 +1 @@
export declare const getMarkdown: (vditor: IVditor) => string;

View File

@@ -0,0 +1 @@
export declare const graphvizRender: (element: HTMLElement, cdn?: string) => void;

View File

@@ -0,0 +1 @@
export declare const highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;

View File

@@ -0,0 +1,6 @@
declare global {
interface Window {
vditorImageIntersectionObserver: IntersectionObserver;
}
}
export declare const lazyLoadImageRender: (element?: (HTMLElement | Document)) => boolean;

View File

@@ -0,0 +1 @@
export declare const markmapRender: (element?: (HTMLElement | Document), cdn?: string) => void;

View File

@@ -0,0 +1,9 @@
declare global {
interface Window {
MathJax: any;
}
}
export declare const mathRender: (element?: (HTMLElement | Document), options?: {
cdn?: string;
math?: IMath;
}) => void;

View File

@@ -0,0 +1 @@
export declare const mediaRender: (element: HTMLElement) => void;

View File

@@ -0,0 +1 @@
export declare const mermaidRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;

View File

@@ -0,0 +1 @@
export declare const mindmapRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;

View File

@@ -0,0 +1 @@
export declare const outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => string;

View File

@@ -0,0 +1 @@
export declare const plantumlRender: (element?: (HTMLElement | Document), cdn?: string) => void;

View File

@@ -0,0 +1,2 @@
export declare const md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
export declare const previewRender: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;

View File

@@ -0,0 +1 @@
export declare const setLute: (options: ILuteOptions) => Lute;

View File

@@ -0,0 +1,6 @@
declare global {
interface Window {
vditorSpeechRange: Range;
}
}
export declare const speechRender: (element: HTMLElement, lang?: keyof II18n) => void;