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,6 @@
/**
* 合并脚注
* @param elements vditor.sv.element
* @param afterCombine 每个脚注块合并完成后的回调, param: root为合并后的脚注块
*/
export declare const combineFootnote: (elements: HTMLElement, afterCombine?: (root: HTMLElement) => void) => void;

13
public/vditor/ts/sv/index.d.ts vendored Normal file
View File

@@ -0,0 +1,13 @@
/// <reference types="./types" />
declare class Editor {
range: Range;
element: HTMLPreElement;
composingLock: boolean;
processTimeoutId: number;
hlToolbarTimeoutId: number;
preventInput: boolean;
constructor(vditor: IVditor);
private copy;
private bindEvent;
}
export { Editor };

1
public/vditor/ts/sv/inputEvent.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare const inputEvent: (vditor: IVditor, event?: InputEvent) => void;

11
public/vditor/ts/sv/process.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
export declare const processPaste: (vditor: IVditor, text: string) => void;
export declare const getSideByType: (spanNode: Node, type: string, isPrevious?: boolean) => false | Element;
export declare const processSpinVditorSVDOM: (html: string, vditor: IVditor) => string;
export declare const processPreviousMarkers: (spanElement: HTMLElement) => string;
export declare const processAfterRender: (vditor: IVditor, options?: {
enableAddUndoStack: boolean;
enableHint: boolean;
enableInput: boolean;
}) => void;
export declare const processHeading: (vditor: IVditor, value: string) => void;
export declare const processToolbar: (vditor: IVditor, actionBtn: Element, prefix: string, suffix: string) => void;

View File

@@ -0,0 +1 @@
export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;