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

14
public/vditor/ts/util/selection.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
export declare const getEditorRange: (vditor: IVditor) => Range;
export declare const getCursorPosition: (editor: HTMLElement) => {
left: number;
top: number;
};
export declare const selectIsEditor: (editor: HTMLElement, range?: Range) => boolean;
export declare const setSelectionFocus: (range: Range) => void;
export declare const getSelectPosition: (selectElement: HTMLElement, editorElement: HTMLElement, range?: Range) => {
end: number;
start: number;
};
export declare const setSelectionByPosition: (start: number, end: number, editor: HTMLElement) => Range;
export declare const setRangeByWbr: (element: HTMLElement, range: Range) => void;
export declare const insertHTML: (html: string, vditor: IVditor) => void;