删除多余的vditor编辑器ts文件

This commit is contained in:
yangjian 2020-09-26 22:00:09 +08:00
parent 1c1480fd28
commit 1015334744
102 changed files with 0 additions and 696 deletions

View File

@ -1,63 +0,0 @@
/// <reference types="./types" />
import VditorMethod from "./method";
declare class Vditor extends VditorMethod {
readonly version: string;
vditor: IVditor;
/**
* @param id Vditor ID
* @param options Vditor
*/
constructor(id: string | HTMLElement, options?: IOptions);
/** 设置主题 */
setTheme(theme: "dark" | "classic", contentTheme?: string, codeTheme?: string, contentThemePath?: string): void;
/** 获取 Markdown 内容 */
getValue(): string;
/** 获取编辑器当前编辑模式 */
getCurrentMode(): "wysiwyg" | "sv" | "ir";
/** 聚焦到编辑器 */
focus(): void;
/** 让编辑器失焦 */
blur(): void;
/** 禁用编辑器 */
disabled(): void;
/** 解除编辑器禁用 */
enable(): void;
/** 返回选中的字符串 */
getSelection(): string;
/** 设置预览区域内容 */
renderPreview(value?: string): void;
/** 获取焦点位置 */
getCursorPosition(): {
left: number;
top: number;
};
/** 上传是否还在进行中 */
isUploading(): boolean;
/** 清除缓存 */
clearCache(): void;
/** 禁用缓存 */
disabledCache(): void;
/** 启用缓存 */
enableCache(): void;
/** HTML 转 md */
html2md(value: string): string;
/** 获取 HTML */
getHTML(): string;
/** 消息提示。time 为 0 将一直显示 */
tip(text: string, time?: number): void;
/** 设置预览模式 */
setPreviewMode(mode: "both" | "editor"): void;
/** 删除选中内容 */
deleteValue(): void;
/** 更新选中内容 */
updateValue(value: string): void;
/** 在焦点处插入内容,并默认进行 Markdown 渲染 */
insertValue(value: string, render?: boolean): void;
/** 设置编辑器内容 */
setValue(markdown: string, clearStack?: boolean): void;
/** 清空 undo & redo 栈 */
clearStack(): void;
/** 销毁编辑器 */
destroy(): void;
}
export default Vditor;

View File

@ -1,39 +0,0 @@
/// <reference types="./types" />
declare class Vditor {
/** 为 element 中的代码块添加复制按钮 */
static codeRender: (element: HTMLElement, lang?: "en_US" | "ja_JP" | "ko_KR" | "zh_CN") => void;
/** 对 graphviz 进行渲染 */
static graphvizRender: (element: HTMLElement, cdn?: string) => void;
/** 为 element 中的代码块进行高亮渲染 */
static highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;
/** 对数学公式进行渲染 */
static mathRender: (element: HTMLElement, options?: {
cdn?: string;
math?: IMath;
}) => void;
/** 转换 element 中 class 为 className 的元素为流程图/时序图/甘特图 */
static mermaidRender: (element: HTMLElement, className?: string, cdn?: string) => void;
/** 图表渲染 */
static chartRender: (element?: HTMLElement | Document, cdn?: string) => void;
/** 五线谱渲染 */
static abcRender: (element?: HTMLElement | Document, cdn?: string) => void;
/** 脑图渲染 */
static mindmapRender: (element?: HTMLElement | Document, cdn?: string) => void;
/** 大纲渲染 */
static outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => void;
/** 为[特定链接](https://github.com/Vanessa219/vditor/issues/7)分别渲染为视频、音频、嵌入的 iframe */
static mediaRender: (element: HTMLElement) => void;
/** 对选中的文字进行阅读 */
static speechRender: (element: HTMLElement, lang?: "en_US" | "ja_JP" | "ko_KR" | "zh_CN") => void;
/** 对图片进行懒加载 */
static lazyLoadImageRender: (element?: HTMLElement | Document) => boolean;
/** Markdown 文本转换为 HTML该方法需使用[异步编程](https://ld246.com/article/1546828434083?r=Vaness) */
static md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
/** 页面 Markdown 文章渲染 */
static preview: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;
/** 设置代码主题 */
static setCodeTheme: (codeTheme: string, cdn?: string) => void;
/** 设置内容主题 */
static setContentTheme: (contentTheme: string, path: string) => void;
}
export default Vditor;

View File

@ -1,41 +0,0 @@
/// <reference types="./types" />
declare const _VDITOR_VERSION: string;
export { _VDITOR_VERSION as VDITOR_VERSION };
export declare abstract class Constants {
static readonly ZWSP: string;
static readonly MOBILE_WIDTH: number;
static readonly CLASS_MENU_DISABLED: string;
static readonly EDIT_TOOLBARS: string[];
static readonly CODE_THEME: string[];
static readonly CODE_LANGUAGES: string[];
static readonly CDN: string;
static readonly MARKDOWN_OPTIONS: {
autoSpace: boolean;
chinesePunct: boolean;
codeBlockPreview: boolean;
fixTermTypo: boolean;
footnotes: boolean;
linkBase: string;
listStyle: boolean;
mark: boolean;
paragraphBeginningSpace: boolean;
sanitize: boolean;
toc: boolean;
};
static readonly HLJS_OPTIONS: {
enable: boolean;
lineNumber: boolean;
style: string;
};
static readonly MATH_OPTIONS: IMath;
static readonly THEME_OPTIONS: {
current: string;
list: {
"ant-design": string;
dark: string;
light: string;
wechat: string;
};
path: string;
};
}

View File

@ -1,7 +0,0 @@
/// <reference types="./types" />
export declare class DevTools {
element: HTMLDivElement;
private ASTChart;
constructor();
renderEchart(vditor: IVditor): void;
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
export declare const download: (vditor: IVditor, content: string, filename: string) => void;
export declare const exportMarkdown: (vditor: IVditor) => void;
export declare const exportPDF: (vditor: IVditor) => void;
export declare const exportHTML: (vditor: IVditor) => void;

View File

@ -1,14 +0,0 @@
/// <reference types="./types" />
export declare class Hint {
timeId: number;
element: HTMLDivElement;
recentLanguage: string;
private splitChar;
private lastIndex;
constructor(hintExtends: IHintExtend[]);
render(vditor: IVditor): void;
genHTML(data: IHintData[], key: string, vditor: IVditor): void;
fillEmoji: (element: HTMLElement, vditor: IVditor) => void;
select(event: KeyboardEvent, vditor: IVditor): boolean;
private getKey;
}

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const i18n: II18n;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const expandMarker: (range: Range, vditor: IVditor) => void;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const highlightToolbarIR: (vditor: IVditor) => void;

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const input: (vditor: IVditor, range: Range, ignoreSpace?: boolean, event?: InputEvent) => void;

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
export declare const processHint: (vditor: IVditor) => void;
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

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;

View File

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

View File

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

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const codeRender: (element: HTMLElement, lang?: keyof II18n) => void;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const getHTML: (vditor: IVditor) => string;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const getMarkdown: (vditor: IVditor) => string;

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;

View File

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

View File

@ -1,10 +0,0 @@
/// <reference types="./types" />
declare global {
interface Window {
MathJax: any;
}
}
export declare const mathRender: (element: HTMLElement, options?: {
cdn?: string;
math?: IMath;
}) => void;

View File

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

View File

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

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => void;

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const setLute: (options: ILuteOptions) => Lute;

View File

@ -1,7 +0,0 @@
/// <reference types="./types" />
declare global {
interface Window {
vditorSpeechRange: Range;
}
}
export declare const speechRender: (element: HTMLElement, lang?: keyof II18n) => void;

View File

@ -1,7 +0,0 @@
/// <reference types="./types" />
export declare class Outline {
element: HTMLElement;
constructor(outlineLabel: string);
render(vditor: IVditor): void;
toggle(vditor: IVditor, show?: boolean): void;
}

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
export declare class Preview {
element: HTMLElement;
private mdTimeoutId;
constructor(vditor: IVditor);
render(vditor: IVditor, value?: string): void;
private afterRender;
private copyToX;
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
export declare class Resize {
element: HTMLElement;
constructor(vditor: IVditor);
private bindEvent;
}

View File

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

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const inputEvent: (vditor: IVditor, event?: InputEvent) => void;

View File

@ -1,12 +0,0 @@
/// <reference types="./types" />
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

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;

View File

@ -1,6 +0,0 @@
export declare class Tip {
element: HTMLElement;
constructor();
show(text: string, time?: number): void;
hide(): void;
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Both extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,4 +0,0 @@
export declare class Br {
element: HTMLElement;
constructor();
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class CodeTheme extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class ContentTheme extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
export declare class Counter {
element: HTMLElement;
constructor(vditor: IVditor);
render(vditor: IVditor, mdText: string): void;
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Custom extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Devtools extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,4 +0,0 @@
export declare class Divider {
element: HTMLElement;
constructor();
}

View File

@ -1,8 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare const setEditMode: (vditor: IVditor, type: string, event: Event | string) => void;
export declare class EditMode extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor, panelElement: HTMLElement, menuItem: IMenuItem): void;
}

View File

@ -1,7 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Emoji extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor, panelElement: HTMLElement): void;
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Export extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Fullscreen extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor, menuItem: IMenuItem): void;
}

View File

@ -1,7 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Headings extends MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor, panelElement: HTMLElement): void;
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Help extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Indent extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Info extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class InsertAfter extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class InsertBefore extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
export declare class MenuItem {
element: HTMLElement;
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Outdent extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Outline extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Preview extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor): void;
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Record extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor): void;
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Redo extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Undo extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
}

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
import { MenuItem } from "./MenuItem";
export declare class Upload extends MenuItem {
constructor(vditor: IVditor, menuItem: IMenuItem);
_bindEvent(vditor: IVditor): void;
}

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
export declare class Toolbar {
elements: {
[key: string]: HTMLElement;
};
element: HTMLElement;
constructor(vditor: IVditor);
private genItem;
}

View File

@ -1,21 +0,0 @@
/// <reference types="./types" />
export declare const removeCurrentToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const setCurrentToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const enableToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const disableToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const hideToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const showToolbar: (toolbar: {
[key: string]: HTMLElement;
}, names: string[]) => void;
export declare const hidePanel: (vditor: IVditor, panels: string[], exceptElement?: HTMLElement) => void;
export declare const toggleSubMenu: (vditor: IVditor, panelElement: HTMLElement, actionBtn: Element, level: number) => void;

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
declare global {
interface Window {
visualViewport: HTMLElement;
}
}
export declare const initUI: (vditor: IVditor) => void;
export declare const setPadding: (vditor: IVditor) => void;
export declare const setTypewriterPosition: (vditor: IVditor) => void;

View File

@ -1 +0,0 @@
export declare const setCodeTheme: (codeTheme: string, cdn?: string) => void;

View File

@ -1 +0,0 @@
export declare const setContentTheme: (contentTheme: string, path: string) => void;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const setPreviewMode: (mode: "both" | "editor", vditor: IVditor) => void;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const setTheme: (vditor: IVditor) => void;

View File

@ -1,19 +0,0 @@
/// <reference types="./types" />
declare class Undo {
private stackSize;
private dmp;
private wysiwyg;
private ir;
private sv;
constructor();
clearStack(vditor: IVditor): void;
resetIcon(vditor: IVditor): void;
undo(vditor: IVditor): void;
redo(vditor: IVditor): void;
recordFirstPosition(vditor: IVditor, event: KeyboardEvent): void;
addToUndoStack(vditor: IVditor): void;
private renderDiff;
private resetStack;
private addCaret;
}
export { Undo };

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const getElement: (vditor: IVditor) => HTMLPreElement;

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
declare class Upload {
element: HTMLElement;
isUploading: boolean;
range: Range;
constructor();
}
declare const uploadFiles: (vditor: IVditor, files: FileList | DataTransferItemList | File[], element?: HTMLInputElement) => void;
export { Upload, uploadFiles };

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const setHeaders: (vditor: IVditor, xhr: XMLHttpRequest) => void;

View File

@ -1,8 +0,0 @@
/// <reference types="./types" />
export declare class Options {
options: IOptions;
private defaultOptions;
constructor(options: IOptions);
merge(): IOptions;
private mergeToolbar;
}

View File

@ -1,18 +0,0 @@
export declare class RecordMedia {
SAMPLE_RATE: number;
DEFAULT_SAMPLE_RATE: number;
isRecording: boolean;
readyFlag: boolean;
leftChannel: Float32List[];
rightChannel: Float32List[];
recordingLength: number;
recorder: ScriptProcessorNode;
constructor(e: MediaStream);
cloneChannelData(leftChannelData: Float32List, rightChannelData: Float32List): void;
startRecordingNewWavFile(): void;
stopRecording(): void;
buildWavFileBlob(): Blob;
private downSampleBuffer;
private mergeBuffers;
private writeUTFBytes;
}

View File

@ -1,2 +0,0 @@
export declare const addScriptSync: (path: string, id: string) => boolean;
export declare const addScript: (path: string, id: string) => Promise<unknown>;

View File

@ -1 +0,0 @@
export declare const addStyle: (url: string, id: string) => void;

View File

@ -1 +0,0 @@
export declare const code160to32: (text: string) => string;

View File

@ -1,7 +0,0 @@
export declare const isSafari: () => boolean;
export declare const isFirefox: () => boolean;
export declare const accessLocalStorage: () => boolean;
export declare const getEventName: () => "click" | "touchstart";
export declare const isCtrl: (event: KeyboardEvent) => boolean;
export declare const updateHotkeyTip: (hotkey: string) => string;
export declare const isChrome: () => boolean;

View File

@ -1,9 +0,0 @@
/// <reference types="./types" />
export declare const focusEvent: (vditor: IVditor, editorElement: HTMLElement) => void;
export declare const blurEvent: (vditor: IVditor, editorElement: HTMLElement) => void;
export declare const dropEvent: (vditor: IVditor, editorElement: HTMLElement) => void;
export declare const copyEvent: (vditor: IVditor, editorElement: HTMLElement, copy: (event: ClipboardEvent, vditor: IVditor) => void) => void;
export declare const cutEvent: (vditor: IVditor, editorElement: HTMLElement, copy: (event: ClipboardEvent, vditor: IVditor) => void) => void;
export declare const scrollCenter: (vditor: IVditor) => void;
export declare const hotkeyEvent: (vditor: IVditor, editorElement: HTMLElement) => void;
export declare const selectEvent: (vditor: IVditor, editorElement: HTMLElement) => void;

View File

@ -1,41 +0,0 @@
/// <reference types="./types" />
export declare const fixGSKeyBackspace: (event: KeyboardEvent, vditor: IVditor, startContainer: Node) => boolean;
export declare const fixCJKPosition: (range: Range, vditor: IVditor, event: KeyboardEvent) => void;
export declare const fixCursorDownInlineMath: (range: Range, key: string) => void;
export declare const insertEmptyBlock: (vditor: IVditor, position: InsertPosition) => void;
export declare const isFirstCell: (cellElement: HTMLElement) => false | HTMLTableElement;
export declare const isLastCell: (cellElement: HTMLElement) => false | HTMLTableElement;
export declare const insertAfterBlock: (vditor: IVditor, event: KeyboardEvent, range: Range, element: HTMLElement, blockElement: HTMLElement) => boolean;
export declare const insertBeforeBlock: (vditor: IVditor, event: KeyboardEvent, range: Range, element: HTMLElement, blockElement: HTMLElement) => boolean;
export declare const listToggle: (vditor: IVditor, range: Range, type: string, cancel?: boolean) => void;
export declare const listIndent: (vditor: IVditor, liElement: HTMLElement, range: Range) => void;
export declare const listOutdent: (vditor: IVditor, liElement: HTMLElement, range: Range, topListElement: HTMLElement) => void;
export declare const setTableAlign: (tableElement: HTMLTableElement, type: string) => void;
export declare const isHrMD: (text: string) => boolean;
export declare const isHeadingMD: (text: string) => boolean;
export declare const isToC: (text: string) => boolean;
export declare const renderToc: (vditor: IVditor) => void;
export declare const execAfterRender: (vditor: IVditor, options?: {
enableAddUndoStack: boolean;
enableHint: boolean;
enableInput: boolean;
}) => void;
export declare const fixList: (range: Range, vditor: IVditor, pElement: HTMLElement | false, event: KeyboardEvent) => boolean;
export declare const fixTab: (vditor: IVditor, range: Range, event: KeyboardEvent) => boolean;
export declare const fixMarkdown: (event: KeyboardEvent, vditor: IVditor, pElement: HTMLElement | false, range: Range) => boolean;
export declare const insertRow: (vditor: IVditor, range: Range, cellElement: HTMLElement) => void;
export declare const insertColumn: (vditor: IVditor, tableElement: HTMLTableElement, cellElement: HTMLElement) => void;
export declare const deleteRow: (vditor: IVditor, range: Range, cellElement: HTMLElement) => void;
export declare const deleteColumn: (vditor: IVditor, range: Range, tableElement: HTMLTableElement, cellElement: HTMLElement) => void;
export declare const fixTable: (vditor: IVditor, event: KeyboardEvent, range: Range) => boolean;
export declare const fixCodeBlock: (vditor: IVditor, event: KeyboardEvent, codeRenderElement: HTMLElement, range: Range) => boolean;
export declare const fixBlockquote: (vditor: IVditor, range: Range, event: KeyboardEvent, pElement: HTMLElement | false) => boolean;
export declare const fixTask: (vditor: IVditor, range: Range, event: KeyboardEvent) => boolean;
export declare const fixDelete: (vditor: IVditor, range: Range, event: KeyboardEvent, pElement: HTMLElement | false) => boolean;
export declare const fixHR: (range: Range) => void;
export declare const fixFirefoxArrowUpTable: (event: KeyboardEvent, blockElement: false | HTMLElement, range: Range) => boolean;
export declare const paste: (vditor: IVditor, event: ClipboardEvent & {
target: HTMLElement;
}, callback: {
pasteCode(code: string): void;
}) => void;

View File

@ -1 +0,0 @@
export declare const getSelectText: (editor: HTMLElement, range?: Range) => string;

View File

@ -1,9 +0,0 @@
export declare const hasTopClosestByClassName: (element: Node, className: string) => false | HTMLElement;
export declare const hasTopClosestByAttribute: (element: Node, attr: string, value: string) => false | HTMLElement;
export declare const hasTopClosestByTag: (element: Node, nodeName: string) => false | HTMLElement;
export declare const getTopList: (element: Node) => false | HTMLElement;
export declare const hasClosestByAttribute: (element: Node, attr: string, value: string) => false | HTMLElement;
export declare const hasClosestBlock: (element: Node) => false | HTMLElement;
export declare const hasClosestByMatchTag: (element: Node, nodeName: string) => false | HTMLElement;
export declare const hasClosestByClassName: (element: Node, className: string) => false | HTMLElement;
export declare const getLastNode: (node: Node) => Node;

View File

@ -1,2 +0,0 @@
export declare const hasClosestByTag: (element: Node, nodeName: string) => false | HTMLElement;
export declare const hasClosestByHeadings: (element: Node) => false | HTMLElement;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const highlightToolbar: (vditor: IVditor) => void;

View File

@ -1 +0,0 @@
export declare const matchHotKey: (hotKey: string, event: KeyboardEvent) => boolean;

View File

@ -1 +0,0 @@
export declare const log: (method: string, content: string, type: string, print: boolean) => void;

View File

@ -1 +0,0 @@
export declare const merge: (...options: any[]) => any;

View File

@ -1,3 +0,0 @@
/// <reference types="./types" />
export declare const processPasteCode: (html: string, text: string, type?: string) => string | false;
export declare const processCodeRender: (previewPanel: HTMLElement, vditor: IVditor) => void;

View File

@ -1,15 +0,0 @@
/// <reference types="./types" />
export declare const getEditorRange: (element: HTMLElement) => 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;

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
export declare const afterRenderEvent: (vditor: IVditor, options?: {
enableAddUndoStack: boolean;
enableHint: boolean;
enableInput: boolean;
}) => void;

View File

@ -1,5 +0,0 @@
/// <reference types="./types" />
export declare const highlightToolbarWYSIWYG: (vditor: IVditor) => void;
export declare const genLinkRefPopover: (vditor: IVditor, linkRefElement: HTMLElement) => void;
export declare const genAPopover: (vditor: IVditor, aElement: HTMLElement) => void;
export declare const genImagePopover: (event: Event, vditor: IVditor) => void;

View File

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

View File

@ -1,11 +0,0 @@
/// <reference types="./types" />
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;

View File

@ -1,2 +0,0 @@
/// <reference types="./types" />
export declare const input: (vditor: IVditor, range: Range, event?: InputEvent) => void;

View File

@ -1,3 +0,0 @@
/// <reference types="./types" />
export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;
export declare const removeBlockElement: (vditor: IVditor, event: KeyboardEvent) => boolean;

View File

@ -1,6 +0,0 @@
/// <reference types="./types" />
export declare const renderDomByMd: (vditor: IVditor, md: string, options?: {
enableAddUndoStack: boolean;
enableHint: boolean;
enableInput: boolean;
}) => void;

View File

@ -1,3 +0,0 @@
/// <reference types="./types" />
export declare const setHeading: (vditor: IVditor, tagName: string) => void;
export declare const removeHeading: (vditor: IVditor) => void;

Some files were not shown because too many files have changed in this diff Show More