feat: add vditor locally
This commit is contained in:
5
public/vditor/ts/wysiwyg/afterRenderEvent.d.ts
vendored
Normal file
5
public/vditor/ts/wysiwyg/afterRenderEvent.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const afterRenderEvent: (vditor: IVditor, options?: {
|
||||
enableAddUndoStack: boolean;
|
||||
enableHint: boolean;
|
||||
enableInput: boolean;
|
||||
}) => void;
|
||||
4
public/vditor/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts
vendored
Normal file
4
public/vditor/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare const highlightToolbarWYSIWYG: (vditor: IVditor) => void;
|
||||
export declare const genLinkRefPopover: (vditor: IVditor, linkRefElement: HTMLElement, range?: Range) => void;
|
||||
export declare const genAPopover: (vditor: IVditor, aElement: HTMLElement, range: Range) => void;
|
||||
export declare const genImagePopover: (event: Event, vditor: IVditor) => void;
|
||||
22
public/vditor/ts/wysiwyg/index.d.ts
vendored
Normal file
22
public/vditor/ts/wysiwyg/index.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/// <reference types="./types" />
|
||||
declare class WYSIWYG {
|
||||
range: Range;
|
||||
element: HTMLPreElement;
|
||||
popover: HTMLDivElement;
|
||||
selectPopover: HTMLDivElement;
|
||||
afterRenderTimeoutId: number;
|
||||
hlToolbarTimeoutId: number;
|
||||
preventInput: boolean;
|
||||
composingLock: boolean;
|
||||
commentIds: string[];
|
||||
private scrollListener;
|
||||
constructor(vditor: IVditor);
|
||||
getComments(vditor: IVditor, getData?: boolean): ICommentsData[];
|
||||
triggerRemoveComment(vditor: IVditor): void;
|
||||
showComment(): void;
|
||||
hideComment(): void;
|
||||
unbindListener(): void;
|
||||
private copy;
|
||||
private bindEvent;
|
||||
}
|
||||
export { WYSIWYG };
|
||||
10
public/vditor/ts/wysiwyg/inlineTag.d.ts
vendored
Normal file
10
public/vditor/ts/wysiwyg/inlineTag.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export declare const previoueIsEmptyA: (node: Node) => false | HTMLElement;
|
||||
export declare const nextIsCode: (range: Range) => boolean;
|
||||
export declare const getNextHTML: (node: Node) => string;
|
||||
export declare const getPreviousHTML: (node: Node) => string;
|
||||
export declare const getRenderElementNextNode: (blockCodeElement: HTMLElement) => ChildNode;
|
||||
export declare const splitElement: (range: Range) => {
|
||||
afterHTML: string;
|
||||
beforeHTML: string;
|
||||
};
|
||||
export declare const modifyPre: (vditor: IVditor, range: Range) => void;
|
||||
1
public/vditor/ts/wysiwyg/input.d.ts
vendored
Normal file
1
public/vditor/ts/wysiwyg/input.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const input: (vditor: IVditor, range: Range, event?: InputEvent) => void;
|
||||
2
public/vditor/ts/wysiwyg/processKeydown.d.ts
vendored
Normal file
2
public/vditor/ts/wysiwyg/processKeydown.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;
|
||||
export declare const removeBlockElement: (vditor: IVditor, event: KeyboardEvent) => boolean;
|
||||
5
public/vditor/ts/wysiwyg/renderDomByMd.d.ts
vendored
Normal file
5
public/vditor/ts/wysiwyg/renderDomByMd.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare const renderDomByMd: (vditor: IVditor, md: string, options?: {
|
||||
enableAddUndoStack: boolean;
|
||||
enableHint: boolean;
|
||||
enableInput: boolean;
|
||||
}) => void;
|
||||
2
public/vditor/ts/wysiwyg/setHeading.d.ts
vendored
Normal file
2
public/vditor/ts/wysiwyg/setHeading.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const setHeading: (vditor: IVditor, tagName: string) => void;
|
||||
export declare const removeHeading: (vditor: IVditor) => void;
|
||||
1
public/vditor/ts/wysiwyg/showCode.d.ts
vendored
Normal file
1
public/vditor/ts/wysiwyg/showCode.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const showCode: (previewElement: HTMLElement, vditor: IVditor, first?: boolean) => void;
|
||||
1
public/vditor/ts/wysiwyg/toolbarEvent.d.ts
vendored
Normal file
1
public/vditor/ts/wysiwyg/toolbarEvent.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const toolbarEvent: (vditor: IVditor, actionBtn: Element, event: Event) => void;
|
||||
Reference in New Issue
Block a user