@wangeditor-next/core 6.4.1 → 6.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1127 -0
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -2
- package/dist/index.mjs.map +1 -1
- package/dist/upload.d.ts +454 -0
- package/dist/upload.js +4 -2
- package/dist/upload.js.map +1 -1
- package/dist/upload.mjs +4 -2
- package/dist/upload.mjs.map +1 -1
- package/package.json +11 -12
- package/dist/core/src/config/index.d.ts +0 -13
- package/dist/core/src/config/interface.d.ts +0 -317
- package/dist/core/src/config/register.d.ts +0 -12
- package/dist/core/src/config/style-mode.d.ts +0 -8
- package/dist/core/src/constants/index.d.ts +0 -1
- package/dist/core/src/constants/svg.d.ts +0 -12
- package/dist/core/src/create/bind-node-relation.d.ts +0 -15
- package/dist/core/src/create/create-editor.d.ts +0 -10
- package/dist/core/src/create/create-toolbar.d.ts +0 -14
- package/dist/core/src/create/helper.d.ts +0 -37
- package/dist/core/src/create/index.d.ts +0 -8
- package/dist/core/src/editor/dom-editor.d.ts +0 -154
- package/dist/core/src/editor/interface.d.ts +0 -90
- package/dist/core/src/editor/plugins/with-config.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-content.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-dom.d.ts +0 -10
- package/dist/core/src/editor/plugins/with-emitter.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-event-data.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-history.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-max-length.d.ts +0 -7
- package/dist/core/src/editor/plugins/with-selection.d.ts +0 -7
- package/dist/core/src/i18n/index.d.ts +0 -32
- package/dist/core/src/index.d.ts +0 -45
- package/dist/core/src/menus/bar/HoverBar.d.ts +0 -48
- package/dist/core/src/menus/bar/Toolbar.d.ts +0 -38
- package/dist/core/src/menus/bar-item/BaseButton.d.ts +0 -26
- package/dist/core/src/menus/bar-item/DropPanelButton.d.ts +0 -14
- package/dist/core/src/menus/bar-item/GroupButton.d.ts +0 -17
- package/dist/core/src/menus/bar-item/ModalButton.d.ts +0 -25
- package/dist/core/src/menus/bar-item/Select.d.ts +0 -22
- package/dist/core/src/menus/bar-item/SimpleButton.d.ts +0 -11
- package/dist/core/src/menus/bar-item/index.d.ts +0 -24
- package/dist/core/src/menus/bar-item/tooltip.d.ts +0 -6
- package/dist/core/src/menus/helpers/helpers.d.ts +0 -18
- package/dist/core/src/menus/helpers/position.d.ts +0 -36
- package/dist/core/src/menus/index.d.ts +0 -9
- package/dist/core/src/menus/interface.d.ts +0 -65
- package/dist/core/src/menus/panel-and-modal/BaseClass.d.ts +0 -26
- package/dist/core/src/menus/panel-and-modal/DropPanel.d.ts +0 -12
- package/dist/core/src/menus/panel-and-modal/Modal.d.ts +0 -44
- package/dist/core/src/menus/panel-and-modal/SelectList.d.ts +0 -20
- package/dist/core/src/menus/register.d.ts +0 -15
- package/dist/core/src/parse-html/helper.d.ts +0 -10
- package/dist/core/src/parse-html/index.d.ts +0 -35
- package/dist/core/src/parse-html/parse-common-elem-html.d.ts +0 -15
- package/dist/core/src/parse-html/parse-elem-html.d.ts +0 -15
- package/dist/core/src/parse-html/parse-text-elem-html.d.ts +0 -16
- package/dist/core/src/render/element/getRenderElem.d.ts +0 -11
- package/dist/core/src/render/element/renderElement.d.ts +0 -9
- package/dist/core/src/render/element/renderStyle.d.ts +0 -15
- package/dist/core/src/render/helper.d.ts +0 -6
- package/dist/core/src/render/index.d.ts +0 -27
- package/dist/core/src/render/node2Vnode.d.ts +0 -15
- package/dist/core/src/render/text/genVnode.d.ts +0 -9
- package/dist/core/src/render/text/renderStyle.d.ts +0 -15
- package/dist/core/src/render/text/renderText.d.ts +0 -9
- package/dist/core/src/text-area/TextArea.d.ts +0 -52
- package/dist/core/src/text-area/event-handlers/beforeInput.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/blur.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/click.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/composition.d.ts +0 -27
- package/dist/core/src/text-area/event-handlers/copy.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/cut.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/drag.d.ts +0 -9
- package/dist/core/src/text-area/event-handlers/drop.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/focus.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/index.d.ts +0 -35
- package/dist/core/src/text-area/event-handlers/keydown.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/keypress.d.ts +0 -8
- package/dist/core/src/text-area/event-handlers/paste.d.ts +0 -8
- package/dist/core/src/text-area/helpers.d.ts +0 -30
- package/dist/core/src/text-area/place-holder.d.ts +0 -18
- package/dist/core/src/text-area/syncSelection.d.ts +0 -19
- package/dist/core/src/text-area/update-view.d.ts +0 -13
- package/dist/core/src/to-html/elem2html.d.ts +0 -9
- package/dist/core/src/to-html/index.d.ts +0 -44
- package/dist/core/src/to-html/node2html.d.ts +0 -12
- package/dist/core/src/to-html/text2html.d.ts +0 -9
- package/dist/core/src/upload/createUploader.d.ts +0 -14
- package/dist/core/src/upload/createUppyUploader.d.ts +0 -7
- package/dist/core/src/upload/index.d.ts +0 -9
- package/dist/core/src/upload/interface.d.ts +0 -72
- package/dist/core/src/upload.d.ts +0 -5
- package/dist/core/src/utils/dom.d.ts +0 -103
- package/dist/core/src/utils/hotkeys.d.ts +0 -35
- package/dist/core/src/utils/key.d.ts +0 -11
- package/dist/core/src/utils/line.d.ts +0 -14
- package/dist/core/src/utils/sanitize-html.d.ts +0 -5
- package/dist/core/src/utils/ua.d.ts +0 -14
- package/dist/core/src/utils/util.d.ts +0 -28
- package/dist/core/src/utils/vdom.d.ts +0 -34
- package/dist/core/src/utils/weak-maps.d.ts +0 -60
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1127 @@
|
|
|
1
|
+
import { Ancestor, Descendant, Editor, Element as Element$1, Location, Node as Node$1, NodeEntry, Path, Point, Range } from "slate";
|
|
2
|
+
import { Dom7Array, Dom7Array as Dom7Array$1 } from "dom7";
|
|
3
|
+
import { VNode } from "snabbdom";
|
|
4
|
+
import ee from "event-emitter";
|
|
5
|
+
import * as i18next0 from "i18next";
|
|
6
|
+
|
|
7
|
+
//#region src/utils/dom.d.ts
|
|
8
|
+
|
|
9
|
+
declare enum NodeType {
|
|
10
|
+
ELEMENT_NODE = 1,
|
|
11
|
+
TEXT_NODE = 3,
|
|
12
|
+
CDATA_SECTION_NODE = 4,
|
|
13
|
+
PROCESSING_INSTRUCTION_NODE = 7,
|
|
14
|
+
COMMENT_NODE = 8,
|
|
15
|
+
DOCUMENT_NODE = 9,
|
|
16
|
+
DOCUMENT_TYPE_NODE = 10,
|
|
17
|
+
DOCUMENT_FRAGMENT_NODE = 11,
|
|
18
|
+
}
|
|
19
|
+
declare const isDocument: (value: any) => value is Document;
|
|
20
|
+
declare const isShadowRoot: (value: any) => value is ShadowRoot;
|
|
21
|
+
declare const isDataTransfer: (value: any) => value is DataTransfer;
|
|
22
|
+
declare const isUnprocessedListElement: (el: Element) => boolean;
|
|
23
|
+
declare const isHTMLElememt: (value: any) => value is HTMLElement;
|
|
24
|
+
type DOMPoint = [Node, number];
|
|
25
|
+
/**
|
|
26
|
+
* Returns the host window of a DOM node
|
|
27
|
+
*/
|
|
28
|
+
declare const getDefaultView: (value: any) => Window | null;
|
|
29
|
+
/**
|
|
30
|
+
* Check if a value is a DOM node.
|
|
31
|
+
*/
|
|
32
|
+
declare const isDOMNode: (value: any) => value is DOMNode;
|
|
33
|
+
/**
|
|
34
|
+
* Check if a DOM node is a comment node.
|
|
35
|
+
*/
|
|
36
|
+
declare const isDOMComment: (value: any) => value is DOMComment;
|
|
37
|
+
/**
|
|
38
|
+
* Check if a DOM node is an element node.
|
|
39
|
+
*/
|
|
40
|
+
declare const isDOMElement: (value: any) => value is DOMElement;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a value is a DOM selection.
|
|
43
|
+
*/
|
|
44
|
+
declare const isDOMSelection: (value: any) => value is DOMSelection;
|
|
45
|
+
/**
|
|
46
|
+
* Check if a DOM node is an element node.
|
|
47
|
+
*/
|
|
48
|
+
declare const isDOMText: (value: any) => value is DOMText;
|
|
49
|
+
/**
|
|
50
|
+
* Checks whether a paste event is a plaintext-only event.
|
|
51
|
+
*/
|
|
52
|
+
declare const isPlainTextOnlyPaste: (event: ClipboardEvent) => boolean | null;
|
|
53
|
+
/**
|
|
54
|
+
* Normalize a DOM point so that it always refers to a text node.
|
|
55
|
+
*/
|
|
56
|
+
declare const normalizeDOMPoint: (domPoint: DOMPoint) => DOMPoint;
|
|
57
|
+
/**
|
|
58
|
+
* Determines wether the active element is nested within a shadowRoot
|
|
59
|
+
*/
|
|
60
|
+
declare const hasShadowRoot: () => boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Get the element with the specified id
|
|
63
|
+
*/
|
|
64
|
+
declare const getElementById: (id: string) => null | HTMLElement;
|
|
65
|
+
/**
|
|
66
|
+
* Get the nearest editable child and index at `index` in a `parent`, preferring `direction`.
|
|
67
|
+
*/
|
|
68
|
+
declare const getEditableChildAndIndex: (parent: DOMElement, index: number, direction: "forward" | "backward") => [DOMNode, number];
|
|
69
|
+
/**
|
|
70
|
+
* Get the nearest editable child at `index` in a `parent`, preferring
|
|
71
|
+
* `direction`.
|
|
72
|
+
*/
|
|
73
|
+
declare const getEditableChild: (parent: DOMElement, index: number, direction: "forward" | "backward") => DOMNode;
|
|
74
|
+
/**
|
|
75
|
+
* Get a plaintext representation of the content of a node, accounting for block
|
|
76
|
+
* elements which get a newline appended.
|
|
77
|
+
*
|
|
78
|
+
* The domNode must be attached to the DOM.
|
|
79
|
+
*/
|
|
80
|
+
declare const getPlainText: (domNode: DOMNode) => string;
|
|
81
|
+
/**
|
|
82
|
+
* 在下级节点中找到第一个 void elem
|
|
83
|
+
* @param elem elem
|
|
84
|
+
*/
|
|
85
|
+
declare function getFirstVoidChild(elem: DOMElement): DOMElement | null;
|
|
86
|
+
/**
|
|
87
|
+
* 遍历一个 elem 内所有的 text node ,执行函数
|
|
88
|
+
* @param elem elem
|
|
89
|
+
* @param handler handler
|
|
90
|
+
*/
|
|
91
|
+
declare function walkTextNodes(elem: DOMElement, handler: (textNode: DOMNode, parent: DOMElement) => void): void;
|
|
92
|
+
/**
|
|
93
|
+
* 获取 tagName lower-case
|
|
94
|
+
* @param $elem $elem
|
|
95
|
+
*/
|
|
96
|
+
declare function getTagName($elem: Dom7Array$1): string;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/menus/interface.d.ts
|
|
99
|
+
interface IMenuGroup {
|
|
100
|
+
key: string;
|
|
101
|
+
title: string;
|
|
102
|
+
iconSvg?: string;
|
|
103
|
+
menuKeys: string[];
|
|
104
|
+
}
|
|
105
|
+
interface IPositionStyle {
|
|
106
|
+
top: string;
|
|
107
|
+
left: string;
|
|
108
|
+
right: string;
|
|
109
|
+
bottom: string;
|
|
110
|
+
}
|
|
111
|
+
interface IOption {
|
|
112
|
+
value: string;
|
|
113
|
+
text: string;
|
|
114
|
+
selected?: boolean;
|
|
115
|
+
styleForRenderMenuList?: {
|
|
116
|
+
[key: string]: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
interface IBaseMenu {
|
|
120
|
+
readonly title: string;
|
|
121
|
+
iconSvg?: string;
|
|
122
|
+
readonly hotkey?: string;
|
|
123
|
+
readonly alwaysEnable?: boolean;
|
|
124
|
+
readonly tag: string;
|
|
125
|
+
readonly width?: number;
|
|
126
|
+
getValue: (editor: IDomEditor) => string | boolean;
|
|
127
|
+
getIcon?: (editor: IDomEditor) => string;
|
|
128
|
+
getTitle?: (editor: IDomEditor) => string;
|
|
129
|
+
isActive: (editor: IDomEditor) => boolean;
|
|
130
|
+
isDisabled: (editor: IDomEditor) => boolean;
|
|
131
|
+
exec: (editor: IDomEditor, value: string | boolean) => void;
|
|
132
|
+
}
|
|
133
|
+
interface IButtonMenu extends IBaseMenu {}
|
|
134
|
+
interface ISelectMenu extends IBaseMenu {
|
|
135
|
+
readonly selectPanelWidth?: number;
|
|
136
|
+
getOptions: (editor: IDomEditor) => IOption[];
|
|
137
|
+
}
|
|
138
|
+
interface IDropPanelMenu extends IBaseMenu {
|
|
139
|
+
readonly showDropPanel: boolean;
|
|
140
|
+
getPanelContentElem: (editor: IDomEditor) => DOMElement;
|
|
141
|
+
}
|
|
142
|
+
interface IModalMenu extends IBaseMenu {
|
|
143
|
+
readonly showModal: boolean;
|
|
144
|
+
readonly modalWidth: number;
|
|
145
|
+
getModalContentElem: (editor: IDomEditor) => DOMElement;
|
|
146
|
+
getModalPositionNode: (editor: IDomEditor) => Node$1 | null;
|
|
147
|
+
}
|
|
148
|
+
type MenuFactoryType = () => IButtonMenu | ISelectMenu | IDropPanelMenu | IModalMenu;
|
|
149
|
+
interface IRegisterMenuConf {
|
|
150
|
+
key: string;
|
|
151
|
+
factory: MenuFactoryType;
|
|
152
|
+
config?: ISingleMenuConfig;
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/config/interface.d.ts
|
|
156
|
+
type EmptyText = {
|
|
157
|
+
text: '';
|
|
158
|
+
};
|
|
159
|
+
type ImageElement = {
|
|
160
|
+
type: 'image';
|
|
161
|
+
src: string;
|
|
162
|
+
alt?: string;
|
|
163
|
+
href?: string;
|
|
164
|
+
width?: string;
|
|
165
|
+
height?: string;
|
|
166
|
+
style?: {
|
|
167
|
+
width?: string;
|
|
168
|
+
height?: string;
|
|
169
|
+
};
|
|
170
|
+
children: EmptyText[];
|
|
171
|
+
};
|
|
172
|
+
type VideoElement = {
|
|
173
|
+
type: 'video';
|
|
174
|
+
key?: string;
|
|
175
|
+
src: string;
|
|
176
|
+
poster?: string;
|
|
177
|
+
align?: 'left' | 'center' | 'right';
|
|
178
|
+
width?: string;
|
|
179
|
+
height?: string;
|
|
180
|
+
style?: {
|
|
181
|
+
width?: string;
|
|
182
|
+
height?: string;
|
|
183
|
+
};
|
|
184
|
+
children: EmptyText[];
|
|
185
|
+
};
|
|
186
|
+
interface IHoverbarConf {
|
|
187
|
+
[key: string]: {
|
|
188
|
+
match?: (editor: IDomEditor, n: Node$1) => boolean;
|
|
189
|
+
menuKeys: string[];
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
type AlertType = 'success' | 'info' | 'warning' | 'error';
|
|
193
|
+
type TextStyleMode = 'inline' | 'class';
|
|
194
|
+
type ClassStylePolicy = 'preserve-data' | 'fallback-inline' | 'strict';
|
|
195
|
+
type TableWidthExportMode = 'adaptive' | 'explicit';
|
|
196
|
+
type StyleClassTokenType = 'color' | 'bgColor' | 'fontSize' | 'fontFamily' | 'textAlign' | 'lineHeight' | 'indent';
|
|
197
|
+
interface IClassStyleUnsupportedPayload {
|
|
198
|
+
type: string;
|
|
199
|
+
value: string;
|
|
200
|
+
scene: 'render' | 'toHtml';
|
|
201
|
+
fallback: 'preserve-data' | 'inline' | 'throw';
|
|
202
|
+
message: string;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* EditorEvents 包含所有编辑器的生命周期事件。
|
|
206
|
+
*
|
|
207
|
+
* @property {string} CREATED - 编辑器创建后触发,用于初始化操作。
|
|
208
|
+
* @property {string} DESTROYED - 编辑器销毁时触发,用于清理操作。
|
|
209
|
+
* @property {string} CHANGE - 编辑器内容发生变化时触发,通常用于监听输入或变动。
|
|
210
|
+
* @property {string} SCROLL - 编辑器滚动时触发,用于同步滚动状态或执行相关操作。
|
|
211
|
+
* @property {string} FULLSCREEN - 编辑器进入全屏时触发,通常用于调整布局或容器尺寸。
|
|
212
|
+
* @property {string} UNFULLSCREEN - 编辑器退出全屏时触发,恢复原始布局状态。
|
|
213
|
+
* @property {string} MODALORPANELSHOW - 弹窗或面板显示时触发,用于执行相关操作。
|
|
214
|
+
* @property {string} MODALORPANELHIDE - 弹窗或面板隐藏时触发,用于执行相关操作。
|
|
215
|
+
*/
|
|
216
|
+
declare const EditorEvents: {
|
|
217
|
+
readonly CREATED: "created";
|
|
218
|
+
readonly DESTROYED: "destroyed";
|
|
219
|
+
readonly CHANGE: "change";
|
|
220
|
+
readonly SCROLL: "scroll";
|
|
221
|
+
readonly FULLSCREEN: "fullscreen";
|
|
222
|
+
readonly UNFULLSCREEN: "unFullScreen";
|
|
223
|
+
readonly MODALORPANELSHOW: "modalOrPanelShow";
|
|
224
|
+
readonly MODALORPANELHIDE: "modalOrPanelHide";
|
|
225
|
+
};
|
|
226
|
+
interface ISingleMenuConfig {
|
|
227
|
+
[key: string]: any;
|
|
228
|
+
iconSvg?: string;
|
|
229
|
+
}
|
|
230
|
+
interface IColorConfig {
|
|
231
|
+
colors: string[];
|
|
232
|
+
}
|
|
233
|
+
interface IFontSizeItem {
|
|
234
|
+
name: string;
|
|
235
|
+
value: string;
|
|
236
|
+
}
|
|
237
|
+
interface IFontSizeConfig {
|
|
238
|
+
fontSizeList: (string | IFontSizeItem)[];
|
|
239
|
+
}
|
|
240
|
+
interface IFontFamilyItem {
|
|
241
|
+
name: string;
|
|
242
|
+
value: string;
|
|
243
|
+
}
|
|
244
|
+
interface IFontFamilyConfig {
|
|
245
|
+
fontFamilyList: (string | IFontFamilyItem)[];
|
|
246
|
+
}
|
|
247
|
+
interface ILineHeightConfig {
|
|
248
|
+
lineHeightList: string[];
|
|
249
|
+
}
|
|
250
|
+
interface IImageMenuBaseConfig {
|
|
251
|
+
checkImage?: (src: string, alt: string, url: string) => boolean | undefined | string;
|
|
252
|
+
parseImageSrc?: (src: string) => string;
|
|
253
|
+
}
|
|
254
|
+
interface IInsertImageConfig extends IImageMenuBaseConfig {
|
|
255
|
+
onInsertedImage?: (imageNode: ImageElement | null) => void;
|
|
256
|
+
}
|
|
257
|
+
interface IEditImageConfig extends IImageMenuBaseConfig {
|
|
258
|
+
onUpdatedImage?: (imageNode: ImageElement | null) => void;
|
|
259
|
+
}
|
|
260
|
+
type ImageResizeUnit = 'px' | '%';
|
|
261
|
+
type ImageResizeSource = 'modal' | 'preset' | 'drag';
|
|
262
|
+
interface IImageResizeCheckPayload {
|
|
263
|
+
width: string;
|
|
264
|
+
height: string;
|
|
265
|
+
rawWidth: string;
|
|
266
|
+
rawHeight: string;
|
|
267
|
+
source: ImageResizeSource;
|
|
268
|
+
}
|
|
269
|
+
interface IImageResizeOption {
|
|
270
|
+
label: string;
|
|
271
|
+
value: string;
|
|
272
|
+
}
|
|
273
|
+
interface IImageResizeConfig {
|
|
274
|
+
/** Resize unit for editor-owned image resize actions. Omit to preserve legacy behavior. */
|
|
275
|
+
resizeUnit?: ImageResizeUnit;
|
|
276
|
+
/** Values for the built-in 30%/50%/100% preset buttons, in their existing order. */
|
|
277
|
+
resizeOptions?: IImageResizeOption[];
|
|
278
|
+
/** Validate normalized image dimensions before they are written to the document. */
|
|
279
|
+
checkImageSize?: (payload: IImageResizeCheckPayload) => boolean | undefined | string;
|
|
280
|
+
}
|
|
281
|
+
interface IEmotionConfig {
|
|
282
|
+
emotions: string[];
|
|
283
|
+
}
|
|
284
|
+
interface IInsertTableConfig {
|
|
285
|
+
minWidth: number;
|
|
286
|
+
minRowHeight: number;
|
|
287
|
+
tableHeader: {
|
|
288
|
+
selected: boolean;
|
|
289
|
+
};
|
|
290
|
+
tableFullWidth: {
|
|
291
|
+
selected: boolean;
|
|
292
|
+
};
|
|
293
|
+
widthExportMode: TableWidthExportMode;
|
|
294
|
+
}
|
|
295
|
+
interface IInsertTableColConfig {
|
|
296
|
+
insertPosition: 'before' | 'after';
|
|
297
|
+
}
|
|
298
|
+
interface ILinkConfig {
|
|
299
|
+
checkLink: (text: string, url: string) => string | boolean | undefined;
|
|
300
|
+
parseLinkUrl: (url: string) => string;
|
|
301
|
+
}
|
|
302
|
+
interface IInsertVideoConfig {
|
|
303
|
+
onInsertedVideo: (videoNode: VideoElement) => NodeEntry | Range;
|
|
304
|
+
checkVideo: (src: string, poster: string) => string | boolean | undefined;
|
|
305
|
+
parseVideoSrc: (url: string) => string;
|
|
306
|
+
}
|
|
307
|
+
type IUploadVideoConfig = IUploadConfig;
|
|
308
|
+
type IUploadImageConfig = IUploadConfig & {
|
|
309
|
+
base64LimitSize: number;
|
|
310
|
+
};
|
|
311
|
+
interface ICodeLangConfig {
|
|
312
|
+
codeLangs: {
|
|
313
|
+
text: string;
|
|
314
|
+
value: string;
|
|
315
|
+
selected?: boolean;
|
|
316
|
+
}[];
|
|
317
|
+
}
|
|
318
|
+
interface ICodeBlockConfig {
|
|
319
|
+
showCopyButton?: boolean;
|
|
320
|
+
}
|
|
321
|
+
interface IMenuConfig {
|
|
322
|
+
bold: ISingleMenuConfig;
|
|
323
|
+
underline: ISingleMenuConfig;
|
|
324
|
+
wavyUnderline: ISingleMenuConfig;
|
|
325
|
+
emphasisDot: ISingleMenuConfig;
|
|
326
|
+
italic: ISingleMenuConfig;
|
|
327
|
+
through: ISingleMenuConfig;
|
|
328
|
+
code: ISingleMenuConfig;
|
|
329
|
+
sub: ISingleMenuConfig;
|
|
330
|
+
sup: ISingleMenuConfig;
|
|
331
|
+
clearStyle: ISingleMenuConfig;
|
|
332
|
+
color: IColorConfig;
|
|
333
|
+
bgColor: IColorConfig;
|
|
334
|
+
fontSize: IFontSizeConfig;
|
|
335
|
+
fontFamily: IFontFamilyConfig;
|
|
336
|
+
indent: ISingleMenuConfig;
|
|
337
|
+
delIndent: ISingleMenuConfig;
|
|
338
|
+
justifyLeft: ISingleMenuConfig;
|
|
339
|
+
justifyRight: ISingleMenuConfig;
|
|
340
|
+
justifyCenter: ISingleMenuConfig;
|
|
341
|
+
justifyJustify: ISingleMenuConfig;
|
|
342
|
+
lineHeight: ILineHeightConfig;
|
|
343
|
+
insertImage: IInsertImageConfig;
|
|
344
|
+
deleteImage: ISingleMenuConfig;
|
|
345
|
+
editImage: IEditImageConfig;
|
|
346
|
+
previewImage: ISingleMenuConfig;
|
|
347
|
+
viewImageLink: ISingleMenuConfig;
|
|
348
|
+
imageWidth30: ISingleMenuConfig;
|
|
349
|
+
imageWidth50: ISingleMenuConfig;
|
|
350
|
+
imageWidth100: ISingleMenuConfig;
|
|
351
|
+
editorImageSizeMenu: ISingleMenuConfig;
|
|
352
|
+
divider: ISingleMenuConfig;
|
|
353
|
+
emotion: IEmotionConfig;
|
|
354
|
+
insertLink: ILinkConfig;
|
|
355
|
+
editLink: ILinkConfig;
|
|
356
|
+
unLink: ISingleMenuConfig;
|
|
357
|
+
viewLink: ISingleMenuConfig;
|
|
358
|
+
codeBlock: ICodeBlockConfig;
|
|
359
|
+
blockquote: ISingleMenuConfig;
|
|
360
|
+
headerSelect: ISingleMenuConfig;
|
|
361
|
+
header1: ISingleMenuConfig;
|
|
362
|
+
header2: ISingleMenuConfig;
|
|
363
|
+
header3: ISingleMenuConfig;
|
|
364
|
+
header4: ISingleMenuConfig;
|
|
365
|
+
header5: ISingleMenuConfig;
|
|
366
|
+
header6: ISingleMenuConfig;
|
|
367
|
+
todo: ISingleMenuConfig;
|
|
368
|
+
formatPainter: ISingleMenuConfig;
|
|
369
|
+
redo: ISingleMenuConfig;
|
|
370
|
+
undo: ISingleMenuConfig;
|
|
371
|
+
fullScreen: ISingleMenuConfig;
|
|
372
|
+
enter: ISingleMenuConfig;
|
|
373
|
+
bulletedList: ISingleMenuConfig;
|
|
374
|
+
numberedList: ISingleMenuConfig;
|
|
375
|
+
numberedListLowerAlpha: ISingleMenuConfig;
|
|
376
|
+
insertTable: ISingleMenuConfig;
|
|
377
|
+
deleteTable: ISingleMenuConfig;
|
|
378
|
+
insertTableRow: IInsertTableConfig;
|
|
379
|
+
deleteTableRow: ISingleMenuConfig;
|
|
380
|
+
insertTableCol: IInsertTableColConfig;
|
|
381
|
+
deleteTableCol: ISingleMenuConfig;
|
|
382
|
+
tableHeader: ISingleMenuConfig;
|
|
383
|
+
tableFullWidth: ISingleMenuConfig;
|
|
384
|
+
mergeTableCell: ISingleMenuConfig;
|
|
385
|
+
splitTableCell: ISingleMenuConfig;
|
|
386
|
+
setTableProperty: ISingleMenuConfig;
|
|
387
|
+
setTableCellProperty: ISingleMenuConfig;
|
|
388
|
+
insertVideo: IInsertVideoConfig;
|
|
389
|
+
uploadVideo: IUploadVideoConfig;
|
|
390
|
+
editVideoSize: ISingleMenuConfig;
|
|
391
|
+
editVideoSrc: ISingleMenuConfig;
|
|
392
|
+
uploadImage: IUploadImageConfig;
|
|
393
|
+
codeSelectLang: ICodeLangConfig;
|
|
394
|
+
}
|
|
395
|
+
type IMenuConfigUpdate = { [K in keyof IMenuConfig]?: Partial<IMenuConfig[K]> };
|
|
396
|
+
/**
|
|
397
|
+
* editor config
|
|
398
|
+
*/
|
|
399
|
+
interface IEditorConfig {
|
|
400
|
+
customAlert: (info: string, type: AlertType) => void;
|
|
401
|
+
onCreated?: (editor: IDomEditor) => void;
|
|
402
|
+
onChange?: (editor: IDomEditor) => void;
|
|
403
|
+
onDestroyed?: (editor: IDomEditor) => void;
|
|
404
|
+
onMaxLength?: (editor: IDomEditor) => void;
|
|
405
|
+
onFocus?: (editor: IDomEditor) => void;
|
|
406
|
+
onBlur?: (editor: IDomEditor) => void;
|
|
407
|
+
/**
|
|
408
|
+
* 自定义粘贴。返回 true 则继续粘贴,返回 false 则自行实现粘贴,阻止默认粘贴
|
|
409
|
+
*/
|
|
410
|
+
customPaste?: (editor: IDomEditor, e: ClipboardEvent) => boolean;
|
|
411
|
+
/**
|
|
412
|
+
* 自定义复制。拦截 event 添加或修改 clipboardData 数据
|
|
413
|
+
*/
|
|
414
|
+
customCopy?: (editor: IDomEditor, e: ClipboardEvent) => void;
|
|
415
|
+
/**
|
|
416
|
+
* 自定义 HTML 清洗逻辑。在 setHtml / 初始化 html / 默认粘贴 HTML 前执行。
|
|
417
|
+
* 返回值会继续进入编辑器的 HTML 解析流程。
|
|
418
|
+
*/
|
|
419
|
+
sanitizeHtml?: (html: string) => string;
|
|
420
|
+
/**
|
|
421
|
+
* 文本/段落样式(color/bgColor/fontSize/fontFamily/textAlign/lineHeight/indent)导出模式。
|
|
422
|
+
* - `inline`: 输出 style 属性(默认)
|
|
423
|
+
* - `class`: 输出 class + data-w-e-*,便于严格 CSP 场景使用
|
|
424
|
+
*/
|
|
425
|
+
textStyleMode?: TextStyleMode;
|
|
426
|
+
/**
|
|
427
|
+
* class 模式遇到“不在受支持样式 token 集合中”的值时的处理策略。
|
|
428
|
+
* - `preserve-data`(默认):保留 data-w-e-*,不输出 class/inline,确保可回读但可能不展示
|
|
429
|
+
* - `fallback-inline`:回退为 inline style,优先保证展示
|
|
430
|
+
* - `strict`:直接抛错,阻止静默降级
|
|
431
|
+
*/
|
|
432
|
+
classStylePolicy?: ClassStylePolicy;
|
|
433
|
+
/**
|
|
434
|
+
* class 模式遇到未知值时的通知回调。
|
|
435
|
+
*/
|
|
436
|
+
onClassStyleUnsupported?: (payload: IClassStyleUnsupportedPayload) => void;
|
|
437
|
+
/**
|
|
438
|
+
* class 模式下允许输出 class 的样式 token 注册表。
|
|
439
|
+
* 用于扩展默认 token(需配合业务方自行提供对应 CSS)。
|
|
440
|
+
*/
|
|
441
|
+
styleClassTokens?: Partial<Record<StyleClassTokenType, string[]>>;
|
|
442
|
+
scroll: boolean;
|
|
443
|
+
placeholder?: string;
|
|
444
|
+
readOnly: boolean;
|
|
445
|
+
autoFocus: boolean;
|
|
446
|
+
decorate?: (nodeEntry: NodeEntry) => Range[];
|
|
447
|
+
maxLength?: number;
|
|
448
|
+
imageResize?: IImageResizeConfig;
|
|
449
|
+
MENU_CONF?: IMenuConfigUpdate;
|
|
450
|
+
hoverbarKeys?: IHoverbarConf;
|
|
451
|
+
EXTEND_CONF?: any;
|
|
452
|
+
skipCacheTypes?: string[];
|
|
453
|
+
}
|
|
454
|
+
interface IInsertKeysConfig {
|
|
455
|
+
index: number;
|
|
456
|
+
keys: string | IToolbarMenuKey[];
|
|
457
|
+
replaceFn?: (config: IToolbarMenuKey) => IToolbarMenuKey;
|
|
458
|
+
}
|
|
459
|
+
interface IToolbarMenuItemConf {
|
|
460
|
+
key: string;
|
|
461
|
+
title?: string;
|
|
462
|
+
iconSvg?: string;
|
|
463
|
+
}
|
|
464
|
+
type IToolbarMenuKey = string | IMenuGroup | IToolbarMenuItemConf;
|
|
465
|
+
/**
|
|
466
|
+
* toolbar config
|
|
467
|
+
*/
|
|
468
|
+
interface IToolbarConfig {
|
|
469
|
+
toolbarKeys: IToolbarMenuKey[];
|
|
470
|
+
insertKeys: IInsertKeysConfig | Array<IInsertKeysConfig>;
|
|
471
|
+
excludeKeys: Array<string>;
|
|
472
|
+
modalAppendToBody: boolean;
|
|
473
|
+
}
|
|
474
|
+
type PluginFnType = <T extends IDomEditor>(editor: T) => T;
|
|
475
|
+
interface ICreateOption$1 {
|
|
476
|
+
selector: string | DOMElement;
|
|
477
|
+
config: Partial<IEditorConfig>;
|
|
478
|
+
content?: Descendant[];
|
|
479
|
+
html?: string;
|
|
480
|
+
plugins: PluginFnType[];
|
|
481
|
+
}
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/editor/interface.d.ts
|
|
484
|
+
type ElementWithId = Element$1 & {
|
|
485
|
+
id: string;
|
|
486
|
+
};
|
|
487
|
+
type TableSelectionEntry = [NodeEntry<Element$1 & {
|
|
488
|
+
type: unknown;
|
|
489
|
+
rowSpan?: number;
|
|
490
|
+
colSpan?: number;
|
|
491
|
+
hidden?: boolean;
|
|
492
|
+
}>, {
|
|
493
|
+
rtl: number;
|
|
494
|
+
ltr: number;
|
|
495
|
+
ttb: number;
|
|
496
|
+
btt: number;
|
|
497
|
+
}];
|
|
498
|
+
type MoveOptions = Parameters<Editor['move']>[0];
|
|
499
|
+
type getMenuConfigReturnType<K$1> = K$1 extends keyof IMenuConfig ? IMenuConfig[K$1] : ISingleMenuConfig;
|
|
500
|
+
/**
|
|
501
|
+
* 扩展 slate Editor 接口
|
|
502
|
+
*/
|
|
503
|
+
interface IDomEditor extends Editor {
|
|
504
|
+
insertData: (data: DataTransfer) => void;
|
|
505
|
+
setFragmentData: (data: Pick<DataTransfer, 'getData' | 'setData'>) => void;
|
|
506
|
+
getConfig: () => IEditorConfig;
|
|
507
|
+
getMenuConfig: <K$1 extends string>(menuKey: K$1) => getMenuConfigReturnType<K$1>;
|
|
508
|
+
getAllMenuKeys: () => string[];
|
|
509
|
+
alert: (info: string, type: AlertType) => void;
|
|
510
|
+
handleTab: () => void;
|
|
511
|
+
getHtml: () => string;
|
|
512
|
+
getHtmlWithId?: (idKey?: string) => string;
|
|
513
|
+
getText: () => string;
|
|
514
|
+
getSelectionText: () => string;
|
|
515
|
+
getElemsByTypePrefix: (typePrefix: string) => ElementWithId[];
|
|
516
|
+
getElemsByType: (type: string, isPrefix?: boolean) => ElementWithId[];
|
|
517
|
+
getParentNode: (node: Node$1) => Ancestor | null;
|
|
518
|
+
isEmpty: () => boolean;
|
|
519
|
+
clear: () => void;
|
|
520
|
+
/** Transform loaded content before Core binds node paths and renders the editor. */
|
|
521
|
+
transformInitialContent?: (content: Descendant[]) => Descendant[];
|
|
522
|
+
dangerouslyInsertHtml: (html: string, isRecursive?: boolean) => void;
|
|
523
|
+
setHtml: (html: string) => void;
|
|
524
|
+
id: string;
|
|
525
|
+
isDestroyed: boolean;
|
|
526
|
+
isFullScreen: boolean;
|
|
527
|
+
focus: (isEnd?: boolean) => void;
|
|
528
|
+
isFocused: () => boolean;
|
|
529
|
+
blur: () => void;
|
|
530
|
+
updateView: () => void;
|
|
531
|
+
destroy: () => void;
|
|
532
|
+
scrollToElem: (id: string) => void;
|
|
533
|
+
showProgressBar: (progress: number) => void;
|
|
534
|
+
hidePanelOrModal: () => void;
|
|
535
|
+
enable: () => void;
|
|
536
|
+
disable: () => void;
|
|
537
|
+
isDisabled: () => boolean;
|
|
538
|
+
toDOMNode: (node: Node$1) => HTMLElement;
|
|
539
|
+
fullScreen: () => void;
|
|
540
|
+
unFullScreen: () => void;
|
|
541
|
+
getEditableContainer: () => DOMElement;
|
|
542
|
+
select: (at: Location) => void;
|
|
543
|
+
deselect: () => void;
|
|
544
|
+
move(options?: MoveOptions): void;
|
|
545
|
+
move(distance: number, reverse?: boolean): void;
|
|
546
|
+
moveReverse: (distance: number) => void;
|
|
547
|
+
restoreSelection: () => void;
|
|
548
|
+
getTableSelection?: () => TableSelectionEntry[][] | null;
|
|
549
|
+
getSelectionPosition: () => Partial<IPositionStyle>;
|
|
550
|
+
getNodePosition: (node: Node$1) => Partial<IPositionStyle>;
|
|
551
|
+
isSelectedAll: () => boolean;
|
|
552
|
+
selectAll: () => void;
|
|
553
|
+
on: (type: string, listener: ee.EventListener) => void;
|
|
554
|
+
off: (type: string, listener: ee.EventListener) => void;
|
|
555
|
+
once: (type: string, listener: ee.EventListener) => void;
|
|
556
|
+
emit: (type: string, ...args: any[]) => void;
|
|
557
|
+
undo?: () => void;
|
|
558
|
+
redo?: () => void;
|
|
559
|
+
clearHistory?: () => void;
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region src/upload/interface.d.ts
|
|
563
|
+
type IUploadHeaders = Record<string, string | number>;
|
|
564
|
+
interface IUploadResultFile {
|
|
565
|
+
name: string;
|
|
566
|
+
type?: string;
|
|
567
|
+
size?: number;
|
|
568
|
+
[key: string]: any;
|
|
569
|
+
}
|
|
570
|
+
interface IUploadFile {
|
|
571
|
+
name: string;
|
|
572
|
+
type: string;
|
|
573
|
+
size: number;
|
|
574
|
+
data: Blob | File;
|
|
575
|
+
source?: string;
|
|
576
|
+
}
|
|
577
|
+
interface IUploader {
|
|
578
|
+
addFiles: (files: IUploadFile[]) => void;
|
|
579
|
+
upload: () => Promise<unknown>;
|
|
580
|
+
destroy?: () => void;
|
|
581
|
+
}
|
|
582
|
+
type FilesType = Record<string, any>;
|
|
583
|
+
type InsertFn = (src: string, poster?: string, alt?: string, href?: string) => void | Promise<void>;
|
|
584
|
+
interface IUploadAdapterContext {
|
|
585
|
+
config: IUploadConfig;
|
|
586
|
+
editor?: IDomEditor;
|
|
587
|
+
}
|
|
588
|
+
type IUploadAdapter = (context: IUploadAdapterContext) => IUploader;
|
|
589
|
+
interface IBaseUploadConfig {
|
|
590
|
+
fieldName?: string;
|
|
591
|
+
maxFileSize?: number;
|
|
592
|
+
maxNumberOfFiles?: number;
|
|
593
|
+
meta?: Record<string, unknown>;
|
|
594
|
+
metaWithUrl: boolean;
|
|
595
|
+
headers?: IUploadHeaders | ((file: IUploadResultFile) => IUploadHeaders) | undefined;
|
|
596
|
+
withCredentials?: boolean;
|
|
597
|
+
timeout?: number;
|
|
598
|
+
onBeforeUpload?: (files: FilesType) => boolean | FilesType;
|
|
599
|
+
onSuccess: (file: IUploadResultFile, response: any) => void;
|
|
600
|
+
onProgress?: (progress: number) => void;
|
|
601
|
+
onFailed: (file: IUploadResultFile, response: any) => void;
|
|
602
|
+
onError: (file: IUploadResultFile, error: any, res: any) => void;
|
|
603
|
+
allowedFileTypes?: string[];
|
|
604
|
+
customInsert?: (res: any, insertFn: InsertFn) => void;
|
|
605
|
+
customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
606
|
+
customBrowseAndUpload?: (insertFn: InsertFn) => void;
|
|
607
|
+
uploadAdapter?: IUploadAdapter;
|
|
608
|
+
uppyConfig?: Record<string, any>;
|
|
609
|
+
xhrConfig?: Record<string, any>;
|
|
610
|
+
}
|
|
611
|
+
interface IUploadConfigWithCustomUpload extends IBaseUploadConfig {
|
|
612
|
+
server?: string;
|
|
613
|
+
customUpload: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
614
|
+
}
|
|
615
|
+
interface IUploadConfigWithUploadAdapter extends IBaseUploadConfig {
|
|
616
|
+
server?: string;
|
|
617
|
+
uploadAdapter: IUploadAdapter;
|
|
618
|
+
customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
619
|
+
}
|
|
620
|
+
interface IUploadConfigWithoutCustomUpload extends IBaseUploadConfig {
|
|
621
|
+
server: string;
|
|
622
|
+
customUpload?: never;
|
|
623
|
+
uploadAdapter?: never;
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* 配置参考 https://uppy.io/docs/uppy/
|
|
627
|
+
*/
|
|
628
|
+
type IUploadConfig = IUploadConfigWithCustomUpload | IUploadConfigWithUploadAdapter | IUploadConfigWithoutCustomUpload;
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region src/menus/bar/Toolbar.d.ts
|
|
631
|
+
type MenuType$1 = IButtonMenu | ISelectMenu | IDropPanelMenu | IModalMenu;
|
|
632
|
+
declare class Toolbar {
|
|
633
|
+
$box: Dom7Array;
|
|
634
|
+
private readonly $toolbar;
|
|
635
|
+
private menus;
|
|
636
|
+
private toolbarItems;
|
|
637
|
+
private config;
|
|
638
|
+
private lngListen;
|
|
639
|
+
constructor(boxSelector: string | DOMElement, config: Partial<IToolbarConfig>);
|
|
640
|
+
getMenus(): {
|
|
641
|
+
[key: string]: MenuType$1;
|
|
642
|
+
};
|
|
643
|
+
getConfig(): Partial<IToolbarConfig>;
|
|
644
|
+
private initToolbar;
|
|
645
|
+
private registerItems;
|
|
646
|
+
private isMenuGroup;
|
|
647
|
+
private registerSingleMenuByConf;
|
|
648
|
+
private registerGroup;
|
|
649
|
+
private registerSingleItem;
|
|
650
|
+
private getEditorInstance;
|
|
651
|
+
private syncToolbarState;
|
|
652
|
+
/**
|
|
653
|
+
* editor onChange 时触发(涉及 DOM 操作,加防抖)
|
|
654
|
+
*/
|
|
655
|
+
changeToolbarState: any;
|
|
656
|
+
/**
|
|
657
|
+
* 销毁 toolbar
|
|
658
|
+
*/
|
|
659
|
+
destroy(): void;
|
|
660
|
+
}
|
|
661
|
+
//#endregion
|
|
662
|
+
//#region src/menus/register.d.ts
|
|
663
|
+
/**
|
|
664
|
+
* 注册菜单配置
|
|
665
|
+
* @param registerMenuConf { key, factory, config } ,各个 menu key 不能重复
|
|
666
|
+
* @param customConfig 自定义 menu config
|
|
667
|
+
*/
|
|
668
|
+
declare function registerMenu(registerMenuConf: IRegisterMenuConf, customConfig?: ISingleMenuConfig): void;
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region src/menus/panel-and-modal/Modal.d.ts
|
|
671
|
+
/**
|
|
672
|
+
* 生成 modal input elems
|
|
673
|
+
* @param labelText label text
|
|
674
|
+
* @param inputId input dom id
|
|
675
|
+
* @param placeholder input placeholder
|
|
676
|
+
* @returns [$container, $input]
|
|
677
|
+
*/
|
|
678
|
+
declare function genModalInputElems(labelText: string, inputId: string, placeholder?: string): DOMElement[];
|
|
679
|
+
/**
|
|
680
|
+
* 生成 modal textarea elems
|
|
681
|
+
* @param labelText label text
|
|
682
|
+
* @param textareaId input dom id
|
|
683
|
+
* @param placeholder input placeholder
|
|
684
|
+
* @returns [$container, $textarea]
|
|
685
|
+
*/
|
|
686
|
+
declare function genModalTextareaElems(labelText: string, textareaId: string, placeholder?: string): DOMElement[];
|
|
687
|
+
/**
|
|
688
|
+
* 生成 modal button elems
|
|
689
|
+
* @param buttonId button dom id
|
|
690
|
+
* @param buttonText button text
|
|
691
|
+
* @returns [ $container, $button ]
|
|
692
|
+
*/
|
|
693
|
+
declare function genModalButtonElems(buttonId: string, buttonText: string): DOMElement[];
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region src/parse-html/index.d.ts
|
|
696
|
+
declare const TEXT_TAGS: string[];
|
|
697
|
+
type PreParseHtmlFnType = ($node: DOMElement) => DOMElement;
|
|
698
|
+
interface IPreParseHtmlConf {
|
|
699
|
+
selector: string;
|
|
700
|
+
preParseHtml: PreParseHtmlFnType;
|
|
701
|
+
}
|
|
702
|
+
declare const PRE_PARSE_HTML_CONF_LIST: IPreParseHtmlConf[];
|
|
703
|
+
/**
|
|
704
|
+
* 注册 pre-parse html 配置
|
|
705
|
+
* @param conf pre-parse html conf
|
|
706
|
+
*/
|
|
707
|
+
declare function registerPreParseHtmlConf(conf: IPreParseHtmlConf): void;
|
|
708
|
+
type ParseStyleHtmlFnType = ($node: DOMElement, node: Descendant, editor: IDomEditor) => Descendant;
|
|
709
|
+
declare const PARSE_STYLE_HTML_FN_LIST: ParseStyleHtmlFnType[];
|
|
710
|
+
/**
|
|
711
|
+
* 注册 parseStyleHtml 函数
|
|
712
|
+
* @param fn parse style html 的函数
|
|
713
|
+
*/
|
|
714
|
+
declare function registerParseStyleHtmlHandler(fn: ParseStyleHtmlFnType): void;
|
|
715
|
+
type ParseElemHtmlFnType = ($elem: DOMElement, children: Descendant[], editor: IDomEditor) => Element$1 | Element$1[];
|
|
716
|
+
declare const PARSE_ELEM_HTML_CONF: {
|
|
717
|
+
[key: string]: ParseElemHtmlFnType;
|
|
718
|
+
};
|
|
719
|
+
interface IParseElemHtmlConf {
|
|
720
|
+
selector: string;
|
|
721
|
+
parseElemHtml: ParseElemHtmlFnType;
|
|
722
|
+
}
|
|
723
|
+
declare function registerParseElemHtmlConf(conf: IParseElemHtmlConf): void;
|
|
724
|
+
//#endregion
|
|
725
|
+
//#region src/render/index.d.ts
|
|
726
|
+
type RenderStyleFnType = (node: Descendant, vnode: VNode, editor?: IDomEditor) => VNode;
|
|
727
|
+
declare const RENDER_STYLE_HANDLER_LIST: RenderStyleFnType[];
|
|
728
|
+
/**
|
|
729
|
+
* 注册处理文本样式的函数
|
|
730
|
+
* @param fn 处理文本样式的函数
|
|
731
|
+
*/
|
|
732
|
+
declare function registerStyleHandler(fn: RenderStyleFnType): void;
|
|
733
|
+
type RenderElemFnType = (elemNode: Element$1, children: VNode[] | null, editor: IDomEditor) => VNode;
|
|
734
|
+
declare const RENDER_ELEM_CONF: {
|
|
735
|
+
[key: string]: RenderElemFnType;
|
|
736
|
+
};
|
|
737
|
+
interface IRenderElemConf {
|
|
738
|
+
type: string;
|
|
739
|
+
renderElem: RenderElemFnType;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* 注册 render elem 函数
|
|
743
|
+
* @param conf { type, renderElem } ,type 即 node.type
|
|
744
|
+
*/
|
|
745
|
+
declare function registerRenderElemConf(conf: IRenderElemConf): void;
|
|
746
|
+
//#endregion
|
|
747
|
+
//#region src/to-html/node2html.d.ts
|
|
748
|
+
interface INodeToHtmlOptions {
|
|
749
|
+
includeId?: boolean;
|
|
750
|
+
idKey?: string;
|
|
751
|
+
}
|
|
752
|
+
//#endregion
|
|
753
|
+
//#region src/to-html/index.d.ts
|
|
754
|
+
type styleToHtmlFnType = (node: Descendant, elemHtml: string, editor?: IDomEditor) => string;
|
|
755
|
+
declare const STYLE_TO_HTML_FN_LIST: styleToHtmlFnType[];
|
|
756
|
+
/**
|
|
757
|
+
* 注册 toHtml 处理文本样式的函数
|
|
758
|
+
* @param fn 处理 toHtml 文本样式的函数
|
|
759
|
+
*/
|
|
760
|
+
declare function registerStyleToHtmlHandler(fn: styleToHtmlFnType): void;
|
|
761
|
+
/**
|
|
762
|
+
* Transform the HTML fragments of the document's top-level nodes.
|
|
763
|
+
*
|
|
764
|
+
* Element serializers intentionally stay node-local. Modules that need
|
|
765
|
+
* neighboring blocks to produce valid HTML (for example semantic lists) use
|
|
766
|
+
* this hook after every node has been serialized.
|
|
767
|
+
*/
|
|
768
|
+
type HtmlTransformFnType = (htmlList: string[], nodes: Descendant[], editor: IDomEditor, options: INodeToHtmlOptions) => string[];
|
|
769
|
+
declare const HTML_TRANSFORM_HANDLER_LIST: HtmlTransformFnType[];
|
|
770
|
+
declare function registerHtmlTransformHandler(fn: HtmlTransformFnType): void;
|
|
771
|
+
declare function transformHtml(htmlList: string[], nodes: Descendant[], editor: IDomEditor, options?: INodeToHtmlOptions): string[];
|
|
772
|
+
interface IElemToHtmlRes {
|
|
773
|
+
html: string;
|
|
774
|
+
prefix?: string;
|
|
775
|
+
suffix?: string;
|
|
776
|
+
}
|
|
777
|
+
type ElemToHtmlFnType = (elemNode: Element$1, childrenHtml: string, editor?: IDomEditor) => string | IElemToHtmlRes;
|
|
778
|
+
declare const ELEM_TO_HTML_CONF: {
|
|
779
|
+
[key: string]: ElemToHtmlFnType;
|
|
780
|
+
};
|
|
781
|
+
interface IElemToHtmlConf {
|
|
782
|
+
type: string;
|
|
783
|
+
elemToHtml: ElemToHtmlFnType;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* 注册 elem to html 函数
|
|
787
|
+
* @param conf { type, elemToHtml } ,type 即 node.type
|
|
788
|
+
*/
|
|
789
|
+
declare function registerElemToHtmlConf(conf: IElemToHtmlConf): void;
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region src/upload/createUploader.d.ts
|
|
792
|
+
type IUploadConfigWithAdapter = IUploadConfig & {
|
|
793
|
+
uploadAdapter: IUploadAdapter;
|
|
794
|
+
};
|
|
795
|
+
type IDefaultUploader = IUploader & {
|
|
796
|
+
[key: string]: any;
|
|
797
|
+
};
|
|
798
|
+
declare function createUploader$1<T extends IUploadConfig>(config: T, editor?: IDomEditor): T extends IUploadConfigWithAdapter ? IUploader : IDefaultUploader;
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region src/create/create-editor.d.ts
|
|
801
|
+
/**
|
|
802
|
+
* 创建编辑器
|
|
803
|
+
*/
|
|
804
|
+
declare function export_default(option: Partial<ICreateOption$1>): IDomEditor;
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region src/create/create-toolbar.d.ts
|
|
807
|
+
interface ICreateOption {
|
|
808
|
+
selector: string | DOMElement;
|
|
809
|
+
config?: Partial<IToolbarConfig>;
|
|
810
|
+
}
|
|
811
|
+
declare function export_default$1(editor: IDomEditor | null, option: ICreateOption): Toolbar;
|
|
812
|
+
//#endregion
|
|
813
|
+
//#region src/create/helper.d.ts
|
|
814
|
+
/**
|
|
815
|
+
* html 字符串 -> content
|
|
816
|
+
* @param editor editor
|
|
817
|
+
* @param html html 字符串
|
|
818
|
+
*/
|
|
819
|
+
declare function htmlToContent(editor: IDomEditor, html?: string): Descendant[];
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region src/config/style-mode.d.ts
|
|
822
|
+
declare function getTextStyleMode(editor?: IDomEditor): TextStyleMode;
|
|
823
|
+
declare function getClassStylePolicy(editor?: IDomEditor): ClassStylePolicy;
|
|
824
|
+
declare function reportUnsupportedClassStyle(editor: IDomEditor | undefined, payload: IClassStyleUnsupportedPayload): void;
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region src/menus/bar/HoverBar.d.ts
|
|
827
|
+
type MenuType = IButtonMenu | ISelectMenu | IDropPanelMenu | IModalMenu;
|
|
828
|
+
declare class HoverBar {
|
|
829
|
+
private readonly $elem;
|
|
830
|
+
private menus;
|
|
831
|
+
private hoverbarItems;
|
|
832
|
+
private prevSelectedNode;
|
|
833
|
+
private isShow;
|
|
834
|
+
private lngListen;
|
|
835
|
+
constructor();
|
|
836
|
+
getMenus(): {
|
|
837
|
+
[key: string]: MenuType;
|
|
838
|
+
};
|
|
839
|
+
hideAndClean(): void;
|
|
840
|
+
/**
|
|
841
|
+
* 判断 hoverbar 是否在网页下部?
|
|
842
|
+
* 如果是,SelectList 和 DropPanel 要显示在 hoverbar 上面
|
|
843
|
+
*/
|
|
844
|
+
private checkPositionBottom;
|
|
845
|
+
private show;
|
|
846
|
+
private changeItemsState;
|
|
847
|
+
private registerItems;
|
|
848
|
+
private registerSingleItem;
|
|
849
|
+
private setPosition;
|
|
850
|
+
/**
|
|
851
|
+
* 获取选中的 node ,以及对应的 menu keys
|
|
852
|
+
*/
|
|
853
|
+
private getSelectedNodeAndMenuKeys;
|
|
854
|
+
/**
|
|
855
|
+
* editor onChange 时触发(涉及 DOM 操作,加防抖)
|
|
856
|
+
*/
|
|
857
|
+
changeHoverbarState: any;
|
|
858
|
+
private getEditorInstance;
|
|
859
|
+
private getHoverbarKeysConf;
|
|
860
|
+
/**
|
|
861
|
+
* 检查两个 node 是否 path 相等
|
|
862
|
+
*/
|
|
863
|
+
private isSamePath;
|
|
864
|
+
/**
|
|
865
|
+
* 销毁 hoverbar
|
|
866
|
+
*/
|
|
867
|
+
destroy(): void;
|
|
868
|
+
}
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region src/text-area/TextArea.d.ts
|
|
871
|
+
declare class TextArea {
|
|
872
|
+
private selectionChangeRoot;
|
|
873
|
+
private destroyed;
|
|
874
|
+
readonly id: number;
|
|
875
|
+
$box: Dom7Array;
|
|
876
|
+
$textAreaContainer: Dom7Array;
|
|
877
|
+
$scroll: Dom7Array;
|
|
878
|
+
$textArea: Dom7Array | null;
|
|
879
|
+
private readonly $progressBar;
|
|
880
|
+
private readonly $maxLengthInfo;
|
|
881
|
+
isComposing: boolean;
|
|
882
|
+
isUpdatingSelection: boolean;
|
|
883
|
+
isDraggingInternally: boolean;
|
|
884
|
+
latestElement: DOMElement | null;
|
|
885
|
+
showPlaceholder: boolean;
|
|
886
|
+
$placeholder: Dom7Array | null;
|
|
887
|
+
private latestEditorSelection;
|
|
888
|
+
constructor(boxSelector: string | DOMElement);
|
|
889
|
+
private get editorInstance();
|
|
890
|
+
private getActiveEditor;
|
|
891
|
+
private bindSelectionChange;
|
|
892
|
+
private onDOMSelectionChange;
|
|
893
|
+
flushDOMSelectionChange(): void;
|
|
894
|
+
/**
|
|
895
|
+
* 绑定事件,如 beforeinput onblur onfocus keydown click copy/paste drag/drop 等
|
|
896
|
+
*/
|
|
897
|
+
private bindEvent;
|
|
898
|
+
private onFocusAndOnBlur;
|
|
899
|
+
/**
|
|
900
|
+
* 修改 maxLength 提示信息
|
|
901
|
+
*/
|
|
902
|
+
private changeMaxLengthInfo;
|
|
903
|
+
/**
|
|
904
|
+
* 修改进度条
|
|
905
|
+
* @param progress 进度
|
|
906
|
+
*/
|
|
907
|
+
changeProgress(progress: number): void;
|
|
908
|
+
/**
|
|
909
|
+
* 修改 view 状态
|
|
910
|
+
*/
|
|
911
|
+
changeViewState(): void;
|
|
912
|
+
/**
|
|
913
|
+
* 销毁 textarea
|
|
914
|
+
*/
|
|
915
|
+
destroy(): void;
|
|
916
|
+
}
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region src/utils/key.d.ts
|
|
919
|
+
/**
|
|
920
|
+
* An auto-incrementing identifier for keys.
|
|
921
|
+
*/
|
|
922
|
+
/**
|
|
923
|
+
* A class that keeps track of a key string. We use a full class here because we
|
|
924
|
+
* want to be able to use them as keys in `WeakMap` objects.
|
|
925
|
+
*/
|
|
926
|
+
declare class Key {
|
|
927
|
+
id: string;
|
|
928
|
+
constructor();
|
|
929
|
+
}
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/editor/dom-editor.d.ts
|
|
932
|
+
/**
|
|
933
|
+
* 自定义全局 command
|
|
934
|
+
*/
|
|
935
|
+
declare const DomEditor: {
|
|
936
|
+
/**
|
|
937
|
+
* Return the host window of the current editor.
|
|
938
|
+
*/
|
|
939
|
+
getWindow(editor: IDomEditor): Window;
|
|
940
|
+
/**
|
|
941
|
+
* Find a key for a Slate node.
|
|
942
|
+
* key 即一个累加不重复的 id ,每一个 slate node 都对对应一个 key ,意思相当于 node.id
|
|
943
|
+
*/
|
|
944
|
+
findKey(editor: IDomEditor | null, node: Node$1): Key;
|
|
945
|
+
setNewKey(node: Node$1): void;
|
|
946
|
+
/**
|
|
947
|
+
* Find the path of Slate node.
|
|
948
|
+
* path 是一个数组,代表 slate node 的位置 https://docs.slatejs.org/concepts/03-locations#path
|
|
949
|
+
*/
|
|
950
|
+
findPath(editor: IDomEditor | null, node: Node$1): Path;
|
|
951
|
+
/**
|
|
952
|
+
* Find the DOM node that implements DocumentOrShadowRoot for the editor.
|
|
953
|
+
*/
|
|
954
|
+
findDocumentOrShadowRoot(editor: IDomEditor): Document | ShadowRoot;
|
|
955
|
+
/**
|
|
956
|
+
* 获取父节点
|
|
957
|
+
* @param editor editor
|
|
958
|
+
* @param node cur node
|
|
959
|
+
*/
|
|
960
|
+
getParentNode(editor: IDomEditor | null, node: Node$1): Ancestor | null;
|
|
961
|
+
/**
|
|
962
|
+
* 获取当前节点的所有父节点
|
|
963
|
+
* @param editor editor
|
|
964
|
+
* @param node cur node
|
|
965
|
+
*/
|
|
966
|
+
getParentsNodes(editor: IDomEditor, node: Node$1): Ancestor[];
|
|
967
|
+
/**
|
|
968
|
+
* 获取当前节点对应的顶级节点
|
|
969
|
+
* @param editor editor
|
|
970
|
+
* @param curNode cur node
|
|
971
|
+
*/
|
|
972
|
+
getTopNode(editor: IDomEditor, curNode: Node$1): Node$1;
|
|
973
|
+
/**
|
|
974
|
+
* Find the native DOM element from a Slate node or editor.
|
|
975
|
+
*/
|
|
976
|
+
toDOMNode(editor: IDomEditor, node: Node$1): HTMLElement;
|
|
977
|
+
/**
|
|
978
|
+
* Check if a Slate node currently has a mapped DOM node.
|
|
979
|
+
* During IME/composition transitions the Slate tree can update before DOM patching finishes.
|
|
980
|
+
*/
|
|
981
|
+
hasDOMNodeBySlateNode(editor: IDomEditor, node: Node$1): boolean;
|
|
982
|
+
/**
|
|
983
|
+
* Check if both range endpoints can be resolved to DOM nodes right now.
|
|
984
|
+
*/
|
|
985
|
+
canResolveDOMRange(editor: IDomEditor, range: Range): boolean;
|
|
986
|
+
/**
|
|
987
|
+
* Check if a DOM node is within the editor.
|
|
988
|
+
*/
|
|
989
|
+
hasDOMNode(editor: IDomEditor, target: DOMNode, options?: {
|
|
990
|
+
editable?: boolean;
|
|
991
|
+
}): boolean;
|
|
992
|
+
/**
|
|
993
|
+
* Find a native DOM range from a Slate `range`.
|
|
994
|
+
*
|
|
995
|
+
* Notice: the returned range will always be ordinal regardless of the direction of Slate `range` due to DOM API limit.
|
|
996
|
+
*
|
|
997
|
+
* there is no way to create a reverse DOM Range using Range.setStart/setEnd
|
|
998
|
+
* according to https://dom.spec.whatwg.org/#concept-range-bp-set.
|
|
999
|
+
*/
|
|
1000
|
+
toDOMRange(editor: IDomEditor, range: Range): DOMRange;
|
|
1001
|
+
/**
|
|
1002
|
+
* Find a native DOM selection point from a Slate point.
|
|
1003
|
+
*/
|
|
1004
|
+
toDOMPoint(editor: IDomEditor, point: Point): DOMPoint;
|
|
1005
|
+
/**
|
|
1006
|
+
* Find a Slate node from a native DOM `element`.
|
|
1007
|
+
*/
|
|
1008
|
+
toSlateNode(editor: IDomEditor | null, domNode: DOMNode): Node$1;
|
|
1009
|
+
/**
|
|
1010
|
+
* Get the target range from a DOM `event`.
|
|
1011
|
+
*/
|
|
1012
|
+
findEventRange(editor: IDomEditor, event: any): Range;
|
|
1013
|
+
/**
|
|
1014
|
+
* Find a Slate range from a DOM range or selection.
|
|
1015
|
+
*/
|
|
1016
|
+
toSlateRange<T extends boolean>(editor: IDomEditor, domRange: DOMRange | DOMStaticRange | DOMSelection, options: {
|
|
1017
|
+
exactMatch: T;
|
|
1018
|
+
suppressThrow: T;
|
|
1019
|
+
}): T extends true ? Range | null : Range;
|
|
1020
|
+
/**
|
|
1021
|
+
* Find a Slate point from a DOM selection's `domNode` and `domOffset`.
|
|
1022
|
+
*/
|
|
1023
|
+
toSlatePoint<T extends boolean>(editor: IDomEditor, domPoint: DOMPoint, options: {
|
|
1024
|
+
exactMatch: T;
|
|
1025
|
+
suppressThrow: T;
|
|
1026
|
+
searchDirection?: "forward" | "backward";
|
|
1027
|
+
}): T extends true ? Point | null : Point;
|
|
1028
|
+
hasRange(editor: IDomEditor, range: Range): boolean;
|
|
1029
|
+
getNodeType(node: Node$1): string;
|
|
1030
|
+
checkNodeType(node: Node$1, type: string): boolean;
|
|
1031
|
+
getNodesStr(nodes: Node$1[]): string;
|
|
1032
|
+
getSelectedVoidNode(editor: IDomEditor): Element$1 | null;
|
|
1033
|
+
getSelectedElems(editor: IDomEditor): Element$1[];
|
|
1034
|
+
getSelectedNodeByType(editor: IDomEditor, type: string): Node$1 | null;
|
|
1035
|
+
getSelectedTextNode(editor: IDomEditor): Node$1 | null;
|
|
1036
|
+
isNodeSelected(editor: IDomEditor, node: Node$1): boolean;
|
|
1037
|
+
isSelectionAtLineEnd(editor: IDomEditor, path: Path): boolean;
|
|
1038
|
+
getTextarea(editor: IDomEditor): TextArea;
|
|
1039
|
+
getToolbar(editor: IDomEditor): Toolbar | null;
|
|
1040
|
+
getHoverbar(editor: IDomEditor): HoverBar | null;
|
|
1041
|
+
normalizeContent(editor: IDomEditor): void;
|
|
1042
|
+
/**
|
|
1043
|
+
* 获取:距离触发 maxLength,还可以插入多少字符
|
|
1044
|
+
* @param editor editor
|
|
1045
|
+
*/
|
|
1046
|
+
getLeftLengthOfMaxLength(editor: IDomEditor): number;
|
|
1047
|
+
cleanExposedTexNodeInSelectionBlock(editor: IDomEditor): void;
|
|
1048
|
+
/**
|
|
1049
|
+
* 是否是编辑器里最后一个元素
|
|
1050
|
+
* @param editor editor
|
|
1051
|
+
* @param node node
|
|
1052
|
+
*/
|
|
1053
|
+
isLastNode(editor: IDomEditor, node: Node$1): boolean;
|
|
1054
|
+
/**
|
|
1055
|
+
* 生成空白 paragraph
|
|
1056
|
+
*/
|
|
1057
|
+
genEmptyParagraph(): Element$1;
|
|
1058
|
+
/**
|
|
1059
|
+
* 是否选中了 void node
|
|
1060
|
+
* @param editor editor
|
|
1061
|
+
*/
|
|
1062
|
+
isSelectedVoidNode(editor: IDomEditor): boolean;
|
|
1063
|
+
/**
|
|
1064
|
+
* 选区是否在一个空行
|
|
1065
|
+
* @param editor editor
|
|
1066
|
+
*/
|
|
1067
|
+
isSelectedEmptyParagraph(editor: IDomEditor): boolean | undefined;
|
|
1068
|
+
/**
|
|
1069
|
+
* 当前 path 指向的 node ,是否是空的(无内容)
|
|
1070
|
+
* @param editor editor
|
|
1071
|
+
* @param path path
|
|
1072
|
+
*/
|
|
1073
|
+
isEmptyPath(editor: IDomEditor, path: Path): boolean;
|
|
1074
|
+
};
|
|
1075
|
+
//#endregion
|
|
1076
|
+
//#region src/i18n/index.d.ts
|
|
1077
|
+
/**
|
|
1078
|
+
* 添加多语言配置
|
|
1079
|
+
* @param lng 语言
|
|
1080
|
+
* @param resources 多语言配置
|
|
1081
|
+
*/
|
|
1082
|
+
declare function i18nAddResources(lng: string, resources: object): void;
|
|
1083
|
+
/**
|
|
1084
|
+
* 设置语言
|
|
1085
|
+
* @param lng 语言
|
|
1086
|
+
*/
|
|
1087
|
+
declare function i18nChangeLanguage(lng: string): void;
|
|
1088
|
+
/**
|
|
1089
|
+
* 获取多语言配置
|
|
1090
|
+
* @param lng lang
|
|
1091
|
+
*/
|
|
1092
|
+
declare function i18nGetResources(lng: string): any;
|
|
1093
|
+
/**
|
|
1094
|
+
* 监听语言变更
|
|
1095
|
+
* @param callback
|
|
1096
|
+
* @returns
|
|
1097
|
+
*/
|
|
1098
|
+
declare function i18nListenLanguage(callback: (lng: string) => void): () => void;
|
|
1099
|
+
/**
|
|
1100
|
+
* 翻译
|
|
1101
|
+
*/
|
|
1102
|
+
declare const t: i18next0.TFunction<["translation", ...string[]], undefined>;
|
|
1103
|
+
//#endregion
|
|
1104
|
+
//#region src/index.d.ts
|
|
1105
|
+
/**
|
|
1106
|
+
* @deprecated Please import from `@wangeditor-next/core/upload`.
|
|
1107
|
+
*/
|
|
1108
|
+
declare const createUploader: typeof createUploader$1;
|
|
1109
|
+
/**
|
|
1110
|
+
* @deprecated Please import from `@wangeditor-next/core/upload`.
|
|
1111
|
+
*/
|
|
1112
|
+
declare function createUppyUploader(config: IUploadConfig): IUploader;
|
|
1113
|
+
interface IModuleConf {
|
|
1114
|
+
menus: Array<IRegisterMenuConf>;
|
|
1115
|
+
renderStyle: RenderStyleFnType;
|
|
1116
|
+
renderElems: Array<IRenderElemConf>;
|
|
1117
|
+
styleToHtml: styleToHtmlFnType;
|
|
1118
|
+
htmlTransform?: HtmlTransformFnType;
|
|
1119
|
+
elemsToHtml: Array<IElemToHtmlConf>;
|
|
1120
|
+
preParseHtml: Array<IPreParseHtmlConf>;
|
|
1121
|
+
parseStyleHtml: ParseStyleHtmlFnType;
|
|
1122
|
+
parseElemsHtml: Array<IParseElemHtmlConf>;
|
|
1123
|
+
editorPlugin: <T extends IDomEditor>(editor: T) => T;
|
|
1124
|
+
}
|
|
1125
|
+
//#endregion
|
|
1126
|
+
export { type ClassStylePolicy, DOMComment, DOMElement, DOMNode, DOMPoint, DOMRange, DOMSelection, DOMStaticRange, DOMText, type Dom7Array, DomEditor, ELEM_TO_HTML_CONF, EditorEvents, ElemToHtmlFnType, ElementWithId, HTML_TRANSFORM_HANDLER_LIST, HtmlTransformFnType, type IButtonMenu, type IClassStyleUnsupportedPayload, IDomEditor, type IDropPanelMenu, type IEditorConfig, IElemToHtmlConf, type IImageResizeCheckPayload, type IImageResizeConfig, type IImageResizeOption, type IModalMenu, IModuleConf, type IOption, IParseElemHtmlConf, IPreParseHtmlConf, type IRegisterMenuConf, IRenderElemConf, type ISelectMenu, type ISingleMenuConfig, type IToolbarConfig, type IUploadAdapter, type IUploadAdapterContext, type IUploadConfig, type IUploadFile, type IUploadImageConfig, type IUploadResultFile, type IUploadVideoConfig, type IUploader, type ImageResizeSource, type ImageResizeUnit, NodeType, PARSE_ELEM_HTML_CONF, PARSE_STYLE_HTML_FN_LIST, PRE_PARSE_HTML_CONF_LIST, ParseElemHtmlFnType, ParseStyleHtmlFnType, PreParseHtmlFnType, RENDER_ELEM_CONF, RENDER_STYLE_HANDLER_LIST, RenderElemFnType, RenderStyleFnType, STYLE_TO_HTML_FN_LIST, type StyleClassTokenType, TEXT_TAGS, TableSelectionEntry, type TextStyleMode, Toolbar, export_default as coreCreateEditor, export_default$1 as coreCreateToolbar, createUploader, createUppyUploader, genModalButtonElems, genModalInputElems, genModalTextareaElems, getClassStylePolicy, getDefaultView, getEditableChild, getEditableChildAndIndex, getElementById, getFirstVoidChild, getMenuConfigReturnType, getPlainText, getTagName, getTextStyleMode, hasShadowRoot, htmlToContent, i18nAddResources, i18nChangeLanguage, i18nGetResources, i18nListenLanguage, isDOMComment, isDOMElement, isDOMNode, isDOMSelection, isDOMText, isDataTransfer, isDocument, isHTMLElememt, isPlainTextOnlyPaste, isShadowRoot, isUnprocessedListElement, normalizeDOMPoint, registerElemToHtmlConf, registerHtmlTransformHandler, registerMenu, registerParseElemHtmlConf, registerParseStyleHtmlHandler, registerPreParseHtmlConf, registerRenderElemConf, registerStyleHandler, registerStyleToHtmlHandler, reportUnsupportedClassStyle, styleToHtmlFnType, t, transformHtml, walkTextNodes };
|
|
1127
|
+
//# sourceMappingURL=index.d.ts.map
|