@wangeditor-next/editor 5.6.56 → 5.7.0
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/basic-modules/src/modules/color/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/color/style-to-html.d.ts +3 -1
- package/dist/basic-modules/src/modules/font-size-family/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/font-size-family/style-to-html.d.ts +3 -1
- package/dist/basic-modules/src/modules/image/elem-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/indent/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/indent/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/justify/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/justify/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/modules/line-height/render-style.d.ts +3 -1
- package/dist/basic-modules/src/modules/line-height/style-to-html.d.ts +2 -1
- package/dist/basic-modules/src/utils/style-class.d.ts +14 -0
- package/dist/basic-modules/src/utils/vdom.d.ts +14 -0
- package/dist/core/src/config/interface.d.ts +32 -0
- package/dist/core/src/config/style-mode.d.ts +8 -0
- package/dist/core/src/index.d.ts +2 -1
- package/dist/core/src/render/element/renderStyle.d.ts +3 -1
- package/dist/core/src/render/index.d.ts +2 -2
- package/dist/core/src/render/text/renderStyle.d.ts +3 -1
- package/dist/core/src/to-html/index.d.ts +2 -2
- package/dist/core/src/upload/createUploader.d.ts +7 -3
- package/dist/core/src/upload/createUppyUploader.d.ts +7 -0
- package/dist/core/src/upload/index.d.ts +4 -3
- package/dist/core/src/upload/interface.d.ts +37 -9
- package/dist/css/style.css +4 -4
- package/dist/editor/src/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/list-module/src/module/elem-to-html.d.ts +2 -1
- package/dist/list-module/src/module/style-class.d.ts +6 -0
- package/dist/table-module/src/module/elem-to-html.d.ts +3 -2
- package/dist/table-module/src/module/style-to-html.d.ts +2 -1
- package/dist/video-module/src/module/elem-to-html.d.ts +2 -1
- package/dist/video-module/src/utils/dom.d.ts +1 -1
- package/package.json +8 -8
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @description render color style
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
import { VNode } from 'snabbdom';
|
|
7
8
|
/**
|
|
8
9
|
* 添加样式
|
|
9
10
|
* @param node text node
|
|
10
11
|
* @param vnode vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
* @returns vnode
|
|
12
14
|
*/
|
|
13
|
-
export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
|
|
15
|
+
export declare function renderStyle(node: Descendant, vnode: VNode, editor?: IDomEditor): VNode;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* @description textStyle to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
/**
|
|
7
8
|
* style to html
|
|
8
9
|
* @param textNode slate text node
|
|
9
10
|
* @param textHtml text html
|
|
11
|
+
* @param editor editor instance
|
|
10
12
|
* @returns styled html
|
|
11
13
|
*/
|
|
12
|
-
export declare function styleToHtml(textNode: Descendant, textHtml: string): string;
|
|
14
|
+
export declare function styleToHtml(textNode: Descendant, textHtml: string, editor?: IDomEditor): string;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @description render font-size font-family style
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
import { VNode } from 'snabbdom';
|
|
7
8
|
/**
|
|
8
9
|
* 添加样式
|
|
9
10
|
* @param node slate elem
|
|
10
11
|
* @param vnode vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
* @returns vnode
|
|
12
14
|
*/
|
|
13
|
-
export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
|
|
15
|
+
export declare function renderStyle(node: Descendant, vnode: VNode, editor?: IDomEditor): VNode;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* @description textStyle to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
/**
|
|
7
8
|
* style to html
|
|
8
9
|
* @param textNode slate text node
|
|
9
10
|
* @param textHtml text html
|
|
11
|
+
* @param editor editor instance
|
|
10
12
|
* @returns styled html
|
|
11
13
|
*/
|
|
12
|
-
export declare function styleToHtml(textNode: Descendant, textHtml: string): string;
|
|
14
|
+
export declare function styleToHtml(textNode: Descendant, textHtml: string, editor?: IDomEditor): string;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @description to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Element } from 'slate';
|
|
6
|
-
declare function imageToHtml(elemNode: Element, _childrenHtml: string): string;
|
|
7
|
+
declare function imageToHtml(elemNode: Element, _childrenHtml: string, editor?: IDomEditor): string;
|
|
7
8
|
export declare const imageToHtmlConf: {
|
|
8
9
|
type: string;
|
|
9
10
|
elemToHtml: typeof imageToHtml;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @description render indent style
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
import { VNode } from 'snabbdom';
|
|
7
8
|
/**
|
|
8
9
|
* 添加样式
|
|
9
10
|
* @param node slate elem
|
|
10
11
|
* @param vnode vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
* @returns vnode
|
|
12
14
|
*/
|
|
13
|
-
export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
|
|
15
|
+
export declare function renderStyle(node: Descendant, vnode: VNode, editor?: IDomEditor): VNode;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* @description textStyle to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
|
-
export declare function styleToHtml(node: Descendant, elemHtml: string): string;
|
|
7
|
+
export declare function styleToHtml(node: Descendant, elemHtml: string, editor?: IDomEditor): string;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @description render justify style
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
import { VNode } from 'snabbdom';
|
|
7
8
|
/**
|
|
8
9
|
* 添加样式
|
|
9
10
|
* @param node slate elem
|
|
10
11
|
* @param vnode vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
* @returns vnode
|
|
12
14
|
*/
|
|
13
|
-
export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
|
|
15
|
+
export declare function renderStyle(node: Descendant, vnode: VNode, editor?: IDomEditor): VNode;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* @description textStyle to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
|
-
export declare function styleToHtml(node: Descendant, elemHtml: string): string;
|
|
7
|
+
export declare function styleToHtml(node: Descendant, elemHtml: string, editor?: IDomEditor): string;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
* @description render line-height style
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
7
|
import { VNode } from 'snabbdom';
|
|
7
8
|
/**
|
|
8
9
|
* 添加样式
|
|
9
10
|
* @param node slate elem
|
|
10
11
|
* @param vnode vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
* @returns vnode
|
|
12
14
|
*/
|
|
13
|
-
export declare function renderStyle(node: Descendant, vnode: VNode): VNode;
|
|
15
|
+
export declare function renderStyle(node: Descendant, vnode: VNode, editor?: IDomEditor): VNode;
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
* @description textStyle to html
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
+
import { IDomEditor } from '@wangeditor-next/core';
|
|
5
6
|
import { Descendant } from 'slate';
|
|
6
|
-
export declare function styleToHtml(node: Descendant, elemHtml: string): string;
|
|
7
|
+
export declare function styleToHtml(node: Descendant, elemHtml: string, editor?: IDomEditor): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description text style class utils
|
|
3
|
+
*/
|
|
4
|
+
import { IDomEditor, StyleClassTokenType } from '@wangeditor-next/core';
|
|
5
|
+
import { VNode, VNodeStyle } from 'snabbdom';
|
|
6
|
+
import { Dom7Array } from './dom';
|
|
7
|
+
export type TextStyleType = StyleClassTokenType;
|
|
8
|
+
export type ClassStyleScene = 'render' | 'toHtml';
|
|
9
|
+
export declare function genStyleClassName(type: TextStyleType, value: string): string;
|
|
10
|
+
export declare function getRegisteredStyleTokenValues(editor: IDomEditor | undefined, type: TextStyleType): string[];
|
|
11
|
+
export declare function getTextStyleMode(editor?: IDomEditor): import("@wangeditor-next/core").TextStyleMode;
|
|
12
|
+
export declare function appendStyleClassAndData($text: Dom7Array, type: TextStyleType, value: string, editor?: IDomEditor, scene?: ClassStyleScene, inlineFallback?: () => void): void;
|
|
13
|
+
export declare function appendVnodeStyleClassAndData(vnode: VNode, type: TextStyleType, value: string, editor?: IDomEditor, scene?: ClassStyleScene, inlineFallback?: VNodeStyle): void;
|
|
14
|
+
export declare function getStyleValueFromDataOrClass($text: Dom7Array, type: TextStyleType, editor?: IDomEditor): string;
|
|
@@ -3,9 +3,23 @@
|
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
5
|
import { VNode, VNodeStyle } from 'snabbdom';
|
|
6
|
+
type VNodeDataset = Record<string, string>;
|
|
6
7
|
/**
|
|
7
8
|
* 给 vnode 添加样式
|
|
8
9
|
* @param vnode vnode
|
|
9
10
|
* @param newStyle { key: val }
|
|
10
11
|
*/
|
|
11
12
|
export declare function addVnodeStyle(vnode: VNode, newStyle: VNodeStyle): void;
|
|
13
|
+
/**
|
|
14
|
+
* 给 vnode 添加 className
|
|
15
|
+
* @param vnode vnode
|
|
16
|
+
* @param className css class
|
|
17
|
+
*/
|
|
18
|
+
export declare function addVnodeClassName(vnode: VNode, className: string): void;
|
|
19
|
+
/**
|
|
20
|
+
* 给 vnode 添加 dataset
|
|
21
|
+
* @param vnode vnode
|
|
22
|
+
* @param newDataset { key: val }
|
|
23
|
+
*/
|
|
24
|
+
export declare function addVnodeDataset(vnode: VNode, newDataset: VNodeDataset): void;
|
|
25
|
+
export {};
|
|
@@ -16,6 +16,16 @@ interface IHoverbarConf {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
export type AlertType = 'success' | 'info' | 'warning' | 'error';
|
|
19
|
+
export type TextStyleMode = 'inline' | 'class';
|
|
20
|
+
export type ClassStylePolicy = 'preserve-data' | 'fallback-inline' | 'strict';
|
|
21
|
+
export type StyleClassTokenType = 'color' | 'bgColor' | 'fontSize' | 'fontFamily' | 'textAlign' | 'lineHeight' | 'indent';
|
|
22
|
+
export interface IClassStyleUnsupportedPayload {
|
|
23
|
+
type: string;
|
|
24
|
+
value: string;
|
|
25
|
+
scene: 'render' | 'toHtml';
|
|
26
|
+
fallback: 'preserve-data' | 'inline' | 'throw';
|
|
27
|
+
message: string;
|
|
28
|
+
}
|
|
19
29
|
/**
|
|
20
30
|
* EditorEvents 包含所有编辑器的生命周期事件。
|
|
21
31
|
*
|
|
@@ -202,6 +212,28 @@ export interface IEditorConfig {
|
|
|
202
212
|
* 返回值会继续进入编辑器的 HTML 解析流程。
|
|
203
213
|
*/
|
|
204
214
|
sanitizeHtml?: (html: string) => string;
|
|
215
|
+
/**
|
|
216
|
+
* 文本/段落样式(color/bgColor/fontSize/fontFamily/textAlign/lineHeight/indent)导出模式。
|
|
217
|
+
* - `inline`: 输出 style 属性(默认)
|
|
218
|
+
* - `class`: 输出 class + data-w-e-*,便于严格 CSP 场景使用
|
|
219
|
+
*/
|
|
220
|
+
textStyleMode?: TextStyleMode;
|
|
221
|
+
/**
|
|
222
|
+
* class 模式遇到“不在受支持样式 token 集合中”的值时的处理策略。
|
|
223
|
+
* - `preserve-data`(默认):保留 data-w-e-*,不输出 class/inline,确保可回读但可能不展示
|
|
224
|
+
* - `fallback-inline`:回退为 inline style,优先保证展示
|
|
225
|
+
* - `strict`:直接抛错,阻止静默降级
|
|
226
|
+
*/
|
|
227
|
+
classStylePolicy?: ClassStylePolicy;
|
|
228
|
+
/**
|
|
229
|
+
* class 模式遇到未知值时的通知回调。
|
|
230
|
+
*/
|
|
231
|
+
onClassStyleUnsupported?: (payload: IClassStyleUnsupportedPayload) => void;
|
|
232
|
+
/**
|
|
233
|
+
* class 模式下允许输出 class 的样式 token 注册表。
|
|
234
|
+
* 用于扩展默认 token(需配合业务方自行提供对应 CSS)。
|
|
235
|
+
*/
|
|
236
|
+
styleClassTokens?: Partial<Record<StyleClassTokenType, string[]>>;
|
|
205
237
|
scroll: boolean;
|
|
206
238
|
placeholder?: string;
|
|
207
239
|
readOnly: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description class/inline style mode helpers
|
|
3
|
+
*/
|
|
4
|
+
import { IDomEditor } from '../editor/interface';
|
|
5
|
+
import { ClassStylePolicy, IClassStyleUnsupportedPayload, TextStyleMode } from './interface';
|
|
6
|
+
export declare function getTextStyleMode(editor?: IDomEditor): TextStyleMode;
|
|
7
|
+
export declare function getClassStylePolicy(editor?: IDomEditor): ClassStylePolicy;
|
|
8
|
+
export declare function reportUnsupportedClassStyle(editor: IDomEditor | undefined, payload: IClassStyleUnsupportedPayload): void;
|
package/dist/core/src/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type { IParseElemHtmlConf, IPreParseHtmlConf, ParseStyleHtmlFnType } from
|
|
|
9
9
|
import type { IRenderElemConf, RenderStyleFnType } from './render/index';
|
|
10
10
|
import type { IElemToHtmlConf, styleToHtmlFnType } from './to-html/index';
|
|
11
11
|
export * from './create/index';
|
|
12
|
-
export type { IEditorConfig, IToolbarConfig, IUploadImageConfig, IUploadVideoConfig, } from './config/interface';
|
|
12
|
+
export type { ClassStylePolicy, IClassStyleUnsupportedPayload, IEditorConfig, IToolbarConfig, IUploadImageConfig, IUploadVideoConfig, StyleClassTokenType, TextStyleMode, } from './config/interface';
|
|
13
|
+
export * from './config/style-mode';
|
|
13
14
|
export * from './editor/dom-editor';
|
|
14
15
|
export * from './editor/interface';
|
|
15
16
|
export * from './render/index';
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Element as SlateElement } from 'slate';
|
|
6
6
|
import { VNode } from 'snabbdom';
|
|
7
|
+
import { IDomEditor } from '../../editor/interface';
|
|
7
8
|
/**
|
|
8
9
|
* 渲染样式
|
|
9
10
|
* @param elem slate elem node
|
|
10
11
|
* @param vnode elem Vnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
*/
|
|
12
|
-
declare function renderStyle(elem: SlateElement, vnode: VNode): VNode;
|
|
14
|
+
declare function renderStyle(elem: SlateElement, vnode: VNode, editor?: IDomEditor): VNode;
|
|
13
15
|
export default renderStyle;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @description formats entry
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import { Element as SlateElement
|
|
5
|
+
import { Descendant, Element as SlateElement } from 'slate';
|
|
6
6
|
import { VNode } from 'snabbdom';
|
|
7
7
|
import { IDomEditor } from '../editor/interface';
|
|
8
|
-
export type RenderStyleFnType = (node: Descendant, vnode: VNode) => VNode;
|
|
8
|
+
export type RenderStyleFnType = (node: Descendant, vnode: VNode, editor?: IDomEditor) => VNode;
|
|
9
9
|
export declare const RENDER_STYLE_HANDLER_LIST: RenderStyleFnType[];
|
|
10
10
|
/**
|
|
11
11
|
* 注册处理文本样式的函数
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Text as SlateText } from 'slate';
|
|
6
6
|
import { VNode } from 'snabbdom';
|
|
7
|
+
import { IDomEditor } from '../../editor/interface';
|
|
7
8
|
/**
|
|
8
9
|
* 给字符串增加样式
|
|
9
10
|
* @param leafNode slate text leaf node
|
|
10
11
|
* @param textVnode textVnode
|
|
12
|
+
* @param editor editor
|
|
11
13
|
*/
|
|
12
|
-
declare function addTextVnodeStyle(leafNode: SlateText, textVnode: VNode): VNode;
|
|
14
|
+
declare function addTextVnodeStyle(leafNode: SlateText, textVnode: VNode, editor?: IDomEditor): VNode;
|
|
13
15
|
export default addTextVnodeStyle;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @description to-html entry
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import { Element as SlateElement
|
|
5
|
+
import { Descendant, Element as SlateElement } from 'slate';
|
|
6
6
|
import { IDomEditor } from '../editor/interface';
|
|
7
|
-
export type styleToHtmlFnType = (node: Descendant, elemHtml: string) => string;
|
|
7
|
+
export type styleToHtmlFnType = (node: Descendant, elemHtml: string, editor?: IDomEditor) => string;
|
|
8
8
|
export declare const STYLE_TO_HTML_FN_LIST: styleToHtmlFnType[];
|
|
9
9
|
/**
|
|
10
10
|
* 注册 toHtml 处理文本样式的函数
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
* @description gen uploader
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import Uppy from '@uppy/core';
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import type Uppy from '@uppy/core';
|
|
6
|
+
import type { IDomEditor } from '../editor/interface';
|
|
7
|
+
import type { IUploadAdapter, IUploadConfig, IUploader } from './interface';
|
|
8
|
+
type IUploadConfigWithAdapter = IUploadConfig & {
|
|
9
|
+
uploadAdapter: IUploadAdapter;
|
|
10
|
+
};
|
|
11
|
+
declare function createUploader<T extends IUploadConfig>(config: T, editor?: IDomEditor): T extends IUploadConfigWithAdapter ? IUploader : Uppy;
|
|
8
12
|
export default createUploader;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
5
|
import createUploader from './createUploader';
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
export
|
|
6
|
+
import createUppyUploader from './createUppyUploader';
|
|
7
|
+
import type { IUploadAdapter, IUploadAdapterContext, IUploadConfig, IUploader, IUploadFile, IUploadResultFile } from './interface';
|
|
8
|
+
export { createUploader, createUppyUploader };
|
|
9
|
+
export type { IUploadAdapter, IUploadAdapterContext, IUploadConfig, IUploader, IUploadFile, IUploadResultFile, };
|
|
@@ -2,30 +2,52 @@
|
|
|
2
2
|
* @description upload interface
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import type { UppyFile } from '@uppy/core';
|
|
6
5
|
import type { IDomEditor } from '../editor/interface';
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export type IUploadHeaders = Record<string, string | number>;
|
|
7
|
+
export interface IUploadResultFile {
|
|
8
|
+
name: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
size?: number;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface IUploadFile {
|
|
14
|
+
name: string;
|
|
15
|
+
type: string;
|
|
16
|
+
size: number;
|
|
17
|
+
data: Blob | File;
|
|
18
|
+
source?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IUploader {
|
|
21
|
+
addFiles: (files: IUploadFile[]) => void;
|
|
22
|
+
upload: () => Promise<unknown>;
|
|
23
|
+
destroy?: () => void;
|
|
24
|
+
}
|
|
25
|
+
type FilesType = Record<string, any>;
|
|
10
26
|
type InsertFn = (src: string, poster?: string, alt?: string, href?: string) => void | Promise<void>;
|
|
27
|
+
export interface IUploadAdapterContext {
|
|
28
|
+
config: IUploadConfig;
|
|
29
|
+
editor?: IDomEditor;
|
|
30
|
+
}
|
|
31
|
+
export type IUploadAdapter = (context: IUploadAdapterContext) => IUploader;
|
|
11
32
|
interface IBaseUploadConfig {
|
|
12
33
|
fieldName?: string;
|
|
13
34
|
maxFileSize?: number;
|
|
14
35
|
maxNumberOfFiles?: number;
|
|
15
36
|
meta?: Record<string, unknown>;
|
|
16
37
|
metaWithUrl: boolean;
|
|
17
|
-
headers?:
|
|
38
|
+
headers?: IUploadHeaders | ((file: IUploadResultFile) => IUploadHeaders) | undefined;
|
|
18
39
|
withCredentials?: boolean;
|
|
19
40
|
timeout?: number;
|
|
20
41
|
onBeforeUpload?: (files: FilesType) => boolean | FilesType;
|
|
21
|
-
onSuccess: (file:
|
|
42
|
+
onSuccess: (file: IUploadResultFile, response: any) => void;
|
|
22
43
|
onProgress?: (progress: number) => void;
|
|
23
|
-
onFailed: (file:
|
|
24
|
-
onError: (file:
|
|
44
|
+
onFailed: (file: IUploadResultFile, response: any) => void;
|
|
45
|
+
onError: (file: IUploadResultFile, error: any, res: any) => void;
|
|
25
46
|
allowedFileTypes?: string[];
|
|
26
47
|
customInsert?: (res: any, insertFn: InsertFn) => void;
|
|
27
48
|
customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
28
49
|
customBrowseAndUpload?: (insertFn: InsertFn) => void;
|
|
50
|
+
uploadAdapter?: IUploadAdapter;
|
|
29
51
|
uppyConfig?: Record<string, any>;
|
|
30
52
|
xhrConfig?: Record<string, any>;
|
|
31
53
|
}
|
|
@@ -33,12 +55,18 @@ interface IUploadConfigWithCustomUpload extends IBaseUploadConfig {
|
|
|
33
55
|
server?: string;
|
|
34
56
|
customUpload: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
35
57
|
}
|
|
58
|
+
interface IUploadConfigWithUploadAdapter extends IBaseUploadConfig {
|
|
59
|
+
server?: string;
|
|
60
|
+
uploadAdapter: IUploadAdapter;
|
|
61
|
+
customUpload?: (files: File, insertFn: InsertFn, editor: IDomEditor) => void;
|
|
62
|
+
}
|
|
36
63
|
interface IUploadConfigWithoutCustomUpload extends IBaseUploadConfig {
|
|
37
64
|
server: string;
|
|
38
65
|
customUpload?: never;
|
|
66
|
+
uploadAdapter?: never;
|
|
39
67
|
}
|
|
40
68
|
/**
|
|
41
69
|
* 配置参考 https://uppy.io/docs/uppy/
|
|
42
70
|
*/
|
|
43
|
-
export type IUploadConfig = IUploadConfigWithCustomUpload | IUploadConfigWithoutCustomUpload;
|
|
71
|
+
export type IUploadConfig = IUploadConfigWithCustomUpload | IUploadConfigWithUploadAdapter | IUploadConfigWithoutCustomUpload;
|
|
44
72
|
export {};
|
package/dist/css/style.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
:host,:root{--w-e-textarea-bg-color:#fff;--w-e-textarea-color:#333;--w-e-textarea-border-color:#ccc;--w-e-textarea-slight-border-color:#e8e8e8;--w-e-textarea-slight-color:#d4d4d4;--w-e-textarea-slight-bg-color:#f5f2f0;--w-e-textarea-selected-border-color:#b4d5ff;--w-e-textarea-handler-bg-color:#4290f7;--w-e-toolbar-color:#595959;--w-e-toolbar-bg-color:#fff;--w-e-toolbar-active-color:#333;--w-e-toolbar-active-bg-color:#f1f1f1;--w-e-toolbar-disabled-color:#999;--w-e-toolbar-border-color:#e8e8e8;--w-e-modal-button-bg-color:#fafafa;--w-e-modal-button-border-color:#d9d9d9}
|
|
2
2
|
.w-e-text-container *,.w-e-toolbar *{box-sizing:border-box;margin:0;outline:none;padding:0}.w-e-text-container blockquote,.w-e-text-container li,.w-e-text-container p,.w-e-text-container td,.w-e-text-container th,.w-e-toolbar *{line-height:1.5}.w-e-text-container{background-color:var(--w-e-textarea-bg-color);color:var(--w-e-textarea-color);height:100%;position:relative}.no-scroll{width:100%}.w-e-text-container .w-e-scroll{height:100%;-webkit-overflow-scrolling:touch}.w-e-text-container [data-slate-editor]{outline:0;white-space:pre-wrap;word-wrap:break-word;border-top:1px solid transparent;min-height:100%;padding:0 10px}.w-e-text-container [data-slate-editor] p{margin:15px 0}.w-e-text-container [data-slate-editor] h1,.w-e-text-container [data-slate-editor] h2,.w-e-text-container [data-slate-editor] h3,.w-e-text-container [data-slate-editor] h4,.w-e-text-container [data-slate-editor] h5{margin:20px 0}.w-e-text-container [data-slate-editor] img{cursor:default;display:inline!important;max-width:100%;min-height:20px;min-width:20px}.w-e-text-container [data-slate-editor] span{text-indent:0}.w-e-text-container [data-slate-editor] [data-selected=true]{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-placeholder{font-style:italic;left:10px;top:17px;width:90%}.w-e-max-length-info,.w-e-text-placeholder{color:var(--w-e-textarea-slight-color);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.w-e-max-length-info{bottom:.5em;right:1em}.w-e-bar{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-color);font-size:14px;padding:0 5px}.w-e-bar svg{fill:var(--w-e-toolbar-color);height:14px;width:14px}.w-e-bar-show{display:flex}.w-e-bar-hidden{display:none}.w-e-hover-bar{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 5px #0000001f;position:absolute}.w-e-toolbar{flex-wrap:wrap;position:relative}.w-e-bar-divider{background-color:var(--w-e-toolbar-border-color);display:inline-flex;height:40px;margin:0 5px;width:1px}.w-e-bar-item{display:flex;height:40px;padding:4px;position:relative;text-align:center}.w-e-bar-item,.w-e-bar-item button{align-items:center;justify-content:center}.w-e-bar-item button{background:transparent;border:none;color:var(--w-e-toolbar-color);cursor:pointer;display:inline-flex;height:32px;overflow:hidden;padding:0 8px;white-space:nowrap}.w-e-bar-item button:hover{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item button .title{margin-left:5px}.w-e-bar-item .active{background-color:var(--w-e-toolbar-active-bg-color);color:var(--w-e-toolbar-active-color)}.w-e-bar-item .disabled{color:var(--w-e-toolbar-disabled-color);cursor:not-allowed}.w-e-bar-item .disabled svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover{background-color:var(--w-e-toolbar-bg-color);color:var(--w-e-toolbar-disabled-color)}.w-e-bar-item .disabled:hover svg{fill:var(--w-e-toolbar-disabled-color)}.w-e-menu-tooltip-v5:before{background-color:var(--w-e-toolbar-active-color);border-radius:5px;color:var(--w-e-toolbar-bg-color);content:attr(data-tooltip);font-size:.75em;padding:5px 10px;text-align:center;top:40px;white-space:pre;z-index:1}.w-e-menu-tooltip-v5:after,.w-e-menu-tooltip-v5:before{opacity:0;position:absolute;transition:opacity .6s;visibility:hidden}.w-e-menu-tooltip-v5:after{border-color:transparent transparent var(--w-e-toolbar-active-color) transparent;border-style:solid;border-width:5px;content:"";top:30px}.w-e-menu-tooltip-v5:hover:after,.w-e-menu-tooltip-v5:hover:before{opacity:1;visibility:visible}.w-e-menu-tooltip-v5.tooltip-right:before{left:100%;top:10px}.w-e-menu-tooltip-v5.tooltip-right:after{border-color:transparent var(--w-e-toolbar-active-color) transparent transparent;left:100%;margin-left:-10px;top:16px}.w-e-bar-item-group .w-e-bar-item-menus-container{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;display:none;left:0;margin-top:40px;position:absolute;top:0;z-index:1}.w-e-bar-item-group:hover .w-e-bar-item-menus-container{display:block}.w-e-select-list{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;left:0;margin-top:40px;max-height:350px;min-width:100px;overflow-y:auto;position:absolute;top:0;z-index:1}.w-e-select-list ul{line-height:1;list-style:none}.w-e-select-list ul .selected{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li{cursor:pointer;padding:7px 0 7px 25px;position:relative;text-align:left;white-space:nowrap}.w-e-select-list ul li:hover{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-select-list ul li svg{left:0;margin-left:5px;margin-top:-7px;position:absolute;top:50%}.w-e-bar-bottom .w-e-select-list{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-drop-panel{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;margin-top:40px;min-width:200px;padding:10px;position:absolute;top:0;z-index:1}.w-e-bar-bottom .w-e-drop-panel{bottom:0;margin-bottom:40px;margin-top:0;top:inherit}.w-e-modal{background-color:var(--w-e-toolbar-bg-color);border:1px solid var(--w-e-toolbar-border-color);border-radius:3px;box-shadow:0 2px 10px #0000001f;color:var(--w-e-toolbar-color);font-size:14px;min-height:40px;min-width:100px;padding:20px 15px 0;position:absolute;text-align:left;z-index:1}.w-e-modal .btn-close{cursor:pointer;line-height:1;padding:5px;position:absolute;right:8px;top:7px}.w-e-modal .btn-close svg{fill:var(--w-e-toolbar-color);height:10px;width:10px}.w-e-modal .babel-container{display:block;margin-bottom:15px}.w-e-modal .babel-container span{display:block;margin-bottom:10px}.w-e-modal .button-container{margin-bottom:15px}.w-e-modal button{background-color:var(--w-e-modal-button-bg-color);cursor:pointer;font-weight:400;height:32px;padding:4.5px 15px;text-align:center;touch-action:manipulation;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.w-e-modal button,.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{border:1px solid var(--w-e-modal-button-border-color);border-radius:4px;color:var(--w-e-toolbar-color)}.w-e-modal input[type=number],.w-e-modal input[type=text],.w-e-modal textarea{background-color:var(--w-e-toolbar-bg-color);font-feature-settings:"tnum";font-variant:tabular-nums;padding:4.5px 11px;transition:all .3s;width:100%}.w-e-modal textarea{min-height:60px}body .w-e-modal,body .w-e-modal *{box-sizing:border-box}.w-e-progress-bar{background-color:var(--w-e-textarea-handler-bg-color);height:1px;position:absolute;transition:width .3s;width:0}.w-e-full-screen-container{bottom:0!important;display:flex!important;flex-direction:column!important;height:100%!important;left:0!important;margin:0!important;padding:0!important;position:fixed;right:0!important;top:0!important;width:100%!important}.w-e-full-screen-container [data-w-e-textarea=true]{flex:1!important}
|
|
3
|
-
.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;font-family:monospace;padding:3px}.w-e-panel-content-color{list-style:none;text-align:left;width:230px}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);border-radius:3px 3px;cursor:pointer;display:inline-block;padding:2px}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px 3px;height:17px;width:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{line-height:1.5;margin-bottom:5px;width:100%}.w-e-panel-content-color .clear svg{height:16px;margin-bottom:-4px;width:16px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);display:block;font-size:100%;line-height:1.5;margin:10px 0;padding:10px}.w-e-panel-content-emotion{font-size:20px;list-style:none;text-align:left;width:300px}.w-e-panel-content-emotion li{border-radius:3px 3px;cursor:pointer;display:inline-block;padding:0 5px}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;display:block;height:1px}.w-e-text-container [data-slate-editor] .w-e-image-container{display:inline-block;margin:0 3px}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{overflow:hidden;position:relative}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);height:7px;position:absolute;width:7px}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;left:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;right:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{bottom:0;cursor:nesw-resize;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{bottom:0;cursor:nwse-resize;right:0}.w-e-text-container [contenteditable=false] .w-e-image-container:hover,.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover{box-shadow:none}
|
|
3
|
+
.w-e-text-container [data-slate-editor] code{background-color:var(--w-e-textarea-slight-bg-color);border-radius:3px;font-family:monospace;padding:3px}.w-e-panel-content-color{list-style:none;text-align:left;width:230px}.w-e-panel-content-color li{border:1px solid var(--w-e-toolbar-bg-color);border-radius:3px 3px;cursor:pointer;display:inline-block;padding:2px}.w-e-panel-content-color li:hover{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color li .color-block{border:1px solid var(--w-e-toolbar-border-color);border-radius:3px 3px;height:17px;width:17px}.w-e-panel-content-color .active{border-color:var(--w-e-toolbar-color)}.w-e-panel-content-color .clear{line-height:1.5;margin-bottom:5px;width:100%}.w-e-panel-content-color .clear svg{height:16px;margin-bottom:-4px;width:16px}.w-e-color-ewtzuf{color:#000}.w-e-color-4xvty2{color:#262626}.w-e-color-sqycuk{color:#595959}.w-e-color-3z8psd{color:#8c8c8c}.w-e-color-wksmh8{color:#bfbfbf}.w-e-color-paasa7{color:#d9d9d9}.w-e-color-6bm9m5{color:#e9e9e9}.w-e-color-l91prz{color:#f5f5f5}.w-e-color-k3jp27{color:#fafafa}.w-e-color-67tap4{color:#fff}.w-e-color-tunwkj{color:#e13c39}.w-e-color-s85xre{color:#e75f33}.w-e-color-xx8cx7{color:#eb903a}.w-e-color-8hp23z{color:#f5db4d}.w-e-color-vbyzhj{color:#72c040}.w-e-color-a0scch{color:#59bfc0}.w-e-color-786vrv{color:#4290f7}.w-e-color-jztut9{color:#3658e2}.w-e-color-wh1hr9{color:#6a39c9}.w-e-color-enuf5u{color:#d84493}.w-e-color-ofga0e{color:#fbe9e6}.w-e-color-n2n1ob{color:#fcede1}.w-e-color-o0q9nf{color:#fcefd4}.w-e-color-e2ltc0{color:#fcfbcf}.w-e-color-sx4s4b{color:#e7f6d5}.w-e-color-t4t3jr{color:#daf4f0}.w-e-color-j4jejh{color:#d9edfa}.w-e-color-wb7pdv{color:#e0e8fa}.w-e-color-f3wgv5{color:#ede1f8}.w-e-color-omv2nm{color:#f6e2ea}.w-e-color-qn194t{color:#ffa39e}.w-e-color-mdg9z8{color:#ffbb96}.w-e-color-hl8b9g{color:#ffd591}.w-e-color-4bm5ce{color:#fffb8f}.w-e-color-xyf4ks{color:#b7eb8f}.w-e-color-wj8ykc{color:#87e8de}.w-e-color-9gfdr3{color:#91d5ff}.w-e-color-hsaivy{color:#adc6ff}.w-e-color-v3pqyx{color:#d3adf7}.w-e-color-5sw276{color:#ffadd2}.w-e-color-bsc56c{color:#ff4d4f}.w-e-color-qg254p{color:#ff7a45}.w-e-color-sg36qp{color:#ffa940}.w-e-color-6556xy{color:#ffec3d}.w-e-color-byp7re{color:#73d13d}.w-e-color-eyz4ng{color:#36cfc9}.w-e-color-9xmyha{color:#40a9ff}.w-e-color-g6x347{color:#597ef7}.w-e-color-qkkoll{color:#9254de}.w-e-color-4uljq8{color:#f759ab}.w-e-color-2zmrji{color:#cf1322}.w-e-color-8epkxl{color:#d4380d}.w-e-color-6ff92a{color:#d46b08}.w-e-color-6j9t63{color:#d4b106}.w-e-color-xsysfa{color:#389e0d}.w-e-color-qic72q{color:#08979c}.w-e-color-oounuc{color:#096dd9}.w-e-color-dcs2ck{color:#1d39c4}.w-e-color-nkq71x{color:#531dab}.w-e-color-v640ve{color:#c41d7f}.w-e-color-beewzy{color:#820014}.w-e-color-dsgatp{color:#871400}.w-e-color-du7iiy{color:#873800}.w-e-color-aoputq{color:#614700}.w-e-color-mkf87m{color:#135200}.w-e-color-l4iwsq{color:#00474f}.w-e-color-p38mu9{color:#003a8c}.w-e-color-z5ty33{color:#061178}.w-e-color-6t1egh{color:#22075e}.w-e-color-i6ncxa{color:#780650}.w-e-bg-color-704qgs{background-color:#000}.w-e-bg-color-fwpfd7{background-color:#262626}.w-e-bg-color-477xa6{background-color:#595959}.w-e-bg-color-nkdmaz{background-color:#8c8c8c}.w-e-bg-color-gndi0b{background-color:#bfbfbf}.w-e-bg-color-9cvnta{background-color:#d9d9d9}.w-e-bg-color-pwr64r{background-color:#e9e9e9}.w-e-bg-color-5bmlb2{background-color:#f5f5f5}.w-e-bg-color-464kla{background-color:#fafafa}.w-e-bg-color-psy77q{background-color:#fff}.w-e-bg-color-eol2qk{background-color:#e13c39}.w-e-bg-color-d233xf{background-color:#e75f33}.w-e-bg-color-pe10xx{background-color:#eb903a}.w-e-bg-color-zh1r48{background-color:#f5db4d}.w-e-bg-color-msrni9{background-color:#72c040}.w-e-bg-color-1hl0d7{background-color:#59bfc0}.w-e-bg-color-y7jks4{background-color:#4290f7}.w-e-bg-color-4tr0za{background-color:#3658e2}.w-e-bg-color-nxu5rz{background-color:#6a39c9}.w-e-bg-color-64n36k{background-color:#d84493}.w-e-bg-color-8i15jh{background-color:#fbe9e6}.w-e-bg-color-757x7e{background-color:#fcede1}.w-e-bg-color-83b56i{background-color:#fcefd4}.w-e-bg-color-xnqpum{background-color:#fcfbcf}.w-e-bg-color-czpnne{background-color:#e7f6d5}.w-e-bg-color-d7dz2u{background-color:#daf4f0}.w-e-bg-color-374a2k{background-color:#d9edfa}.w-e-bg-color-gdskwy{background-color:#e0e8fa}.w-e-bg-color-yp1ddr{background-color:#ede1f8}.w-e-bg-color-8pfy6p{background-color:#f6e2ea}.w-e-bg-color-apm4nw{background-color:#ffa39e}.w-e-bg-color-6g15ib{background-color:#ffbb96}.w-e-bg-color-1nt6sj{background-color:#ffd591}.w-e-bg-color-nwr1v0{background-color:#fffb8f}.w-e-bg-color-i1003v{background-color:#b7eb8f}.w-e-bg-color-gltu3f{background-color:#87e8de}.w-e-bg-color-t1ka9p{background-color:#91d5ff}.w-e-bg-color-1uvef1{background-color:#adc6ff}.w-e-bg-color-f6ami0{background-color:#d3adf7}.w-e-bg-color-pe0yps{background-color:#ffadd2}.w-e-bg-color-w4tcbw{background-color:#ff4d4f}.w-e-bg-color-hwut5f{background-color:#ff7a45}.w-e-bg-color-jwvurf{background-color:#ffa940}.w-e-bg-color-x4hvy7{background-color:#ffec3d}.w-e-bg-color-3fhvs4{background-color:#73d13d}.w-e-bg-color-6frso6{background-color:#36cfc9}.w-e-bg-color-1efmi0{background-color:#40a9ff}.w-e-bg-color-7npr4x{background-color:#597ef7}.w-e-bg-color-i1dcmb{background-color:#9254de}.w-e-bg-color-vty8qh{background-color:#f759ab}.w-e-bg-color-nc3yp2{background-color:#cf1322}.w-e-bg-color-sr6s35{background-color:#d4380d}.w-e-bg-color-qrwg7u{background-color:#d46b08}.w-e-bg-color-qvr0bn{background-color:#d4b106}.w-e-bg-color-imvylb{background-color:#389e0d}.w-e-bg-color-bc9d8r{background-color:#08979c}.w-e-bg-color-9iru0d{background-color:#096dd9}.w-e-bg-color-xp99i4{background-color:#1d39c4}.w-e-bg-color-8end7y{background-color:#531dab}.w-e-bg-color-mmwow4{background-color:#c41d7f}.w-e-bg-color-md8if3{background-color:#820014}.w-e-bg-color-or9w8u{background-color:#871400}.w-e-bg-color-ot13y3{background-color:#873800}.w-e-bg-color-b1gcxp{background-color:#614700}.w-e-bg-color-mx5qbl{background-color:#135200}.w-e-bg-color-lh9ewp{background-color:#00474f}.w-e-bg-color-ji79v{background-color:#003a8c}.w-e-bg-color-am3iip{background-color:#061178}.w-e-bg-color-75rwkg{background-color:#22075e}.w-e-bg-color-t5gycf{background-color:#780650}.w-e-font-size-okzesi{font-size:12px}.w-e-font-size-okzfj7{font-size:13px}.w-e-font-size-okzg9w{font-size:14px}.w-e-font-size-okzh0l{font-size:15px}.w-e-font-size-okzhra{font-size:16px}.w-e-font-size-okzjzd{font-size:19px}.w-e-font-size-ol01s1{font-size:22px}.w-e-font-size-ol039f{font-size:24px}.w-e-font-size-ol06yw{font-size:29px}.w-e-font-size-ol0ork{font-size:32px}.w-e-font-size-ol1a9p{font-size:40px}.w-e-font-size-ol1g79{font-size:48px}.w-e-font-family-u0ju81{font-family:黑体}.w-e-font-family-u06buz{font-family:仿宋}.w-e-font-family-u0ariz{font-family:楷体}.w-e-font-family-6uqaji{font-family:标楷体}.w-e-font-family-w9792n{font-family:华文仿宋}.w-e-font-family-w9boqn{font-family:华文楷体}.w-e-font-family-u08e9z{font-family:宋体}.w-e-font-family-xzvn93{font-family:微软雅黑}.w-e-font-family-nbqzij{font-family:Arial}.w-e-font-family-ljm044{font-family:Tahoma}.w-e-font-family-ohnbdm{font-family:Verdana}.w-e-font-family-hmdqt{font-family:Times New Roman}.w-e-font-family-qur2ze{font-family:Courier New}.w-e-text-align-g1w4xb{text-align:left}.w-e-text-align-8k65m7{text-align:center}.w-e-text-align-i96wy{text-align:right}.w-e-text-align-klzjuo{text-align:justify}.w-e-line-height-11is3t{line-height:1}.w-e-line-height-9qd9zn{line-height:1.15}.w-e-line-height-76rj3g{line-height:1.5}.w-e-line-height-11is3u{line-height:2}.w-e-line-height-76rju5{line-height:2.5}.w-e-line-height-11is3v{line-height:3}.w-e-indent-d1l1vd{text-indent:2em}.w-e-indent-dozaza{text-indent:24px}.w-e-indent-dozcgo{text-indent:26px}.w-e-indent-dozdy2{text-indent:28px}.w-e-indent-dozv01{text-indent:30px}.w-e-indent-dozwhf{text-indent:32px}.w-e-indent-dp00xl{text-indent:38px}.w-e-indent-dp0kyc{text-indent:44px}.w-e-indent-dp0nx4{text-indent:48px}.w-e-indent-dp1awn{text-indent:58px}.w-e-indent-dp1uxe{text-indent:64px}.w-e-indent-dp31xo{text-indent:80px}.w-e-indent-dp3tdd{text-indent:96px}.w-e-text-container [data-slate-editor] blockquote{background-color:var(--w-e-textarea-slight-bg-color);border-left:8px solid var(--w-e-textarea-selected-border-color);display:block;font-size:100%;line-height:1.5;margin:10px 0;padding:10px}.w-e-panel-content-emotion{font-size:20px;list-style:none;text-align:left;width:300px}.w-e-panel-content-emotion li{border-radius:3px 3px;cursor:pointer;display:inline-block;padding:0 5px}.w-e-panel-content-emotion li:hover{background-color:var(--w-e-textarea-slight-bg-color)}.w-e-textarea-divider{border-radius:3px;margin:20px auto;padding:20px}.w-e-textarea-divider hr{background-color:var(--w-e-textarea-border-color);border:0;display:block;height:1px}.w-e-text-container [data-slate-editor] .w-e-image-container{display:inline-block;margin:0 3px}.w-e-text-container [data-slate-editor] .w-e-image-container:hover{box-shadow:0 0 0 2px var(--w-e-textarea-selected-border-color)}.w-e-text-container [data-slate-editor] .w-e-selected-image-container{overflow:hidden;position:relative}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .w-e-image-dragger{background-color:var(--w-e-textarea-handler-bg-color);height:7px;position:absolute;width:7px}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-top{cursor:nwse-resize;left:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-top{cursor:nesw-resize;right:0;top:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .left-bottom{bottom:0;cursor:nesw-resize;left:0}.w-e-text-container [data-slate-editor] .w-e-selected-image-container .right-bottom{bottom:0;cursor:nwse-resize;right:0}.w-e-text-container [contenteditable=false] .w-e-image-container:hover,.w-e-text-container [data-slate-editor] .w-e-selected-image-container:hover{box-shadow:none}
|
|
4
4
|
.w-e-text-container [data-slate-editor] pre>code{background-color:var(--w-e-textarea-slight-bg-color);border:1px solid var(--w-e-textarea-slight-border-color);border-radius:4px 4px;display:block;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:14px;text-align:left;text-indent:0;text-shadow:0 1px #fff;white-space:pre;word-break:normal;word-spacing:normal;word-wrap:normal;hyphens:none;line-height:1.5;margin:.5em 0;overflow:auto;padding:1em;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.w-e-text-container [data-slate-editor] pre>code .token.cdata,.w-e-text-container [data-slate-editor] pre>code .token.comment,.w-e-text-container [data-slate-editor] pre>code .token.doctype,.w-e-text-container [data-slate-editor] pre>code .token.prolog{color:#708090}.w-e-text-container [data-slate-editor] pre>code .token.punctuation{color:#999}.w-e-text-container [data-slate-editor] pre>code .token.namespace{opacity:.7}.w-e-text-container [data-slate-editor] pre>code .token.boolean,.w-e-text-container [data-slate-editor] pre>code .token.constant,.w-e-text-container [data-slate-editor] pre>code .token.deleted,.w-e-text-container [data-slate-editor] pre>code .token.number,.w-e-text-container [data-slate-editor] pre>code .token.property,.w-e-text-container [data-slate-editor] pre>code .token.symbol,.w-e-text-container [data-slate-editor] pre>code .token.tag{color:#905}.w-e-text-container [data-slate-editor] pre>code .token.attr-name,.w-e-text-container [data-slate-editor] pre>code .token.builtin,.w-e-text-container [data-slate-editor] pre>code .token.char,.w-e-text-container [data-slate-editor] pre>code .token.inserted,.w-e-text-container [data-slate-editor] pre>code .token.selector,.w-e-text-container [data-slate-editor] pre>code .token.string{color:#690}.w-e-text-container [data-slate-editor] pre>code .language-css .token.string,.w-e-text-container [data-slate-editor] pre>code .style .token.string,.w-e-text-container [data-slate-editor] pre>code .token.entity,.w-e-text-container [data-slate-editor] pre>code .token.operator,.w-e-text-container [data-slate-editor] pre>code .token.url{color:#9a6e3a}.w-e-text-container [data-slate-editor] pre>code .token.atrule,.w-e-text-container [data-slate-editor] pre>code .token.attr-value,.w-e-text-container [data-slate-editor] pre>code .token.keyword{color:#07a}.w-e-text-container [data-slate-editor] pre>code .token.class-name,.w-e-text-container [data-slate-editor] pre>code .token.function{color:#dd4a68}.w-e-text-container [data-slate-editor] pre>code .token.important,.w-e-text-container [data-slate-editor] pre>code .token.regex,.w-e-text-container [data-slate-editor] pre>code .token.variable{color:#e90}.w-e-text-container [data-slate-editor] pre>code .token.bold,.w-e-text-container [data-slate-editor] pre>code .token.important{font-weight:700}.w-e-text-container [data-slate-editor] pre>code .token.italic{font-style:italic}.w-e-text-container [data-slate-editor] pre>code .token.entity{cursor:help}
|
|
5
|
+
.w-e-list-color-ewtzuf{color:#000}.w-e-list-color-4xvty2{color:#262626}.w-e-list-color-sqycuk{color:#595959}.w-e-list-color-3z8psd{color:#8c8c8c}.w-e-list-color-wksmh8{color:#bfbfbf}.w-e-list-color-paasa7{color:#d9d9d9}.w-e-list-color-6bm9m5{color:#e9e9e9}.w-e-list-color-l91prz{color:#f5f5f5}.w-e-list-color-k3jp27{color:#fafafa}.w-e-list-color-67tap4{color:#fff}.w-e-list-color-tunwkj{color:#e13c39}.w-e-list-color-s85xre{color:#e75f33}.w-e-list-color-xx8cx7{color:#eb903a}.w-e-list-color-8hp23z{color:#f5db4d}.w-e-list-color-vbyzhj{color:#72c040}.w-e-list-color-a0scch{color:#59bfc0}.w-e-list-color-786vrv{color:#4290f7}.w-e-list-color-jztut9{color:#3658e2}.w-e-list-color-wh1hr9{color:#6a39c9}.w-e-list-color-enuf5u{color:#d84493}.w-e-list-color-ofga0e{color:#fbe9e6}.w-e-list-color-n2n1ob{color:#fcede1}.w-e-list-color-o0q9nf{color:#fcefd4}.w-e-list-color-e2ltc0{color:#fcfbcf}.w-e-list-color-sx4s4b{color:#e7f6d5}.w-e-list-color-t4t3jr{color:#daf4f0}.w-e-list-color-j4jejh{color:#d9edfa}.w-e-list-color-wb7pdv{color:#e0e8fa}.w-e-list-color-f3wgv5{color:#ede1f8}.w-e-list-color-omv2nm{color:#f6e2ea}.w-e-list-color-qn194t{color:#ffa39e}.w-e-list-color-mdg9z8{color:#ffbb96}.w-e-list-color-hl8b9g{color:#ffd591}.w-e-list-color-4bm5ce{color:#fffb8f}.w-e-list-color-xyf4ks{color:#b7eb8f}.w-e-list-color-wj8ykc{color:#87e8de}.w-e-list-color-9gfdr3{color:#91d5ff}.w-e-list-color-hsaivy{color:#adc6ff}.w-e-list-color-v3pqyx{color:#d3adf7}.w-e-list-color-5sw276{color:#ffadd2}.w-e-list-color-bsc56c{color:#ff4d4f}.w-e-list-color-qg254p{color:#ff7a45}.w-e-list-color-sg36qp{color:#ffa940}.w-e-list-color-6556xy{color:#ffec3d}.w-e-list-color-byp7re{color:#73d13d}.w-e-list-color-eyz4ng{color:#36cfc9}.w-e-list-color-9xmyha{color:#40a9ff}.w-e-list-color-g6x347{color:#597ef7}.w-e-list-color-qkkoll{color:#9254de}.w-e-list-color-4uljq8{color:#f759ab}.w-e-list-color-2zmrji{color:#cf1322}.w-e-list-color-8epkxl{color:#d4380d}.w-e-list-color-6ff92a{color:#d46b08}.w-e-list-color-6j9t63{color:#d4b106}.w-e-list-color-xsysfa{color:#389e0d}.w-e-list-color-qic72q{color:#08979c}.w-e-list-color-oounuc{color:#096dd9}.w-e-list-color-dcs2ck{color:#1d39c4}.w-e-list-color-nkq71x{color:#531dab}.w-e-list-color-v640ve{color:#c41d7f}.w-e-list-color-beewzy{color:#820014}.w-e-list-color-dsgatp{color:#871400}.w-e-list-color-du7iiy{color:#873800}.w-e-list-color-aoputq{color:#614700}.w-e-list-color-mkf87m{color:#135200}.w-e-list-color-l4iwsq{color:#00474f}.w-e-list-color-p38mu9{color:#003a8c}.w-e-list-color-z5ty33{color:#061178}.w-e-list-color-6t1egh{color:#22075e}.w-e-list-color-i6ncxa{color:#780650}
|
|
6
|
+
.w-e-text-container [data-slate-editor] .table-container{border-radius:0;margin-top:10px;overflow-x:auto;padding:0;position:relative;width:100%}.w-e-text-container [data-slate-editor] table{border-collapse:collapse;table-layout:fixed}.w-e-text-container [data-slate-editor] table td,.w-e-text-container [data-slate-editor] table th{border:1px solid var(--w-e-textarea-border-color);line-height:1.5;min-width:30px;overflow:hidden;overflow-wrap:break-word;padding:3px 5px;white-space:pre-wrap;word-break:break-all}.w-e-text-container [data-slate-editor] table th{background-color:var(--w-e-textarea-slight-bg-color);font-weight:700;text-align:center}.w-e-text-container [data-slate-editor] table td.w-e-selected,.w-e-text-container [data-slate-editor] table th.w-e-selected{background-color:rgba(20,86,240,.18)}.w-e-text-container [data-slate-editor] table.table-selection-none ::-moz-selection{background:none}.w-e-text-container [data-slate-editor] table.table-selection-none ::selection{background:none}.w-e-text-container [data-slate-editor] .column-resizer{display:flex;height:0;left:0;position:absolute;top:0;width:0;z-index:1}.w-e-text-container [data-slate-editor] .column-resizer .column-resizer-item{position:relative}.w-e-text-container [data-slate-editor] .resizer-line-hotzone{cursor:col-resize;opacity:0;position:absolute;right:0;transition:opacity .2s ease,visibility .2s ease;visibility:hidden;width:6px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone .resizer-line{background:rgba(20,86,240,.8);height:100%;margin-left:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:2px}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.visible{visibility:visible}.w-e-text-container [data-slate-editor] .resizer-line-hotzone.highlight{opacity:1}.w-e-text-container [data-slate-editor] .row-resizer{display:flex;flex-direction:column;height:0;left:0;position:absolute;top:0;width:0;z-index:1}.w-e-text-container [data-slate-editor] .row-resizer .row-resizer-item{position:relative}.w-e-text-container [data-slate-editor] .resizer-line-hotzone-horizontal{bottom:0;cursor:row-resize;height:6px;opacity:0;position:absolute;transition:opacity .2s ease,visibility .2s ease;visibility:hidden}.w-e-text-container [data-slate-editor] .resizer-line-hotzone-horizontal .resizer-line-horizontal{background:rgba(20,86,240,.8);height:2px;margin-top:5px;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.w-e-text-container [data-slate-editor] .resizer-line-hotzone-horizontal.visible{visibility:visible}.w-e-text-container [data-slate-editor] .resizer-line-hotzone-horizontal.highlight{opacity:1}.w-e-panel-content-table{background-color:var(--w-e-toolbar-bg-color)}.w-e-panel-content-table table{border-collapse:collapse;table-layout:fixed}.w-e-panel-content-table td,.w-e-panel-content-table th{overflow:hidden;overflow-wrap:break-word;white-space:pre-wrap;word-break:break-all}.w-e-panel-content-table td{border:1px solid var(--w-e-toolbar-border-color);cursor:pointer;height:15px;padding:3px 5px;width:20px}.w-e-panel-content-table td.active{background-color:var(--w-e-toolbar-active-bg-color)}.w-e-modal .babel-container span.babel-container-border{display:flex}.w-e-modal .babel-container span.babel-container-border>*{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container span.babel-container-border select{width:114px}.w-e-modal .babel-container span.babel-container-border>:nth-child(n+2){margin-left:8px}.w-e-modal .babel-container span.babel-container-border input:nth-child(3){width:100px}.w-e-modal .babel-container span.babel-container-background input{width:60px}.w-e-modal .babel-container .color-group,.w-e-modal .babel-container span.babel-container-algin select,.w-e-modal .babel-container span.babel-container-background input{border:1px solid var(--w-e-modal-button-border-color);border-radius:2px;height:28px}.w-e-modal .babel-container .color-group{cursor:pointer;position:relative;width:28px}.w-e-modal .babel-container .color-group .w-e-drop-panel{margin-top:28px}.w-e-modal .babel-container .color-group-block{display:block;height:80%;margin:10%;width:80%}.w-e-modal .babel-container .color-group-block svg{height:20px;margin:1px 0;width:20px}.w-e-table-layout-fixed{table-layout:fixed}.w-e-table-border-style-solid{border-style:solid}.w-e-table-border-style-dotted{border-style:dotted}.w-e-table-border-style-dashed{border-style:dashed}.w-e-table-border-style-double{border-style:double}.w-e-table-border-style-groove{border-style:groove}.w-e-table-border-style-ridge{border-style:ridge}.w-e-table-border-style-inset{border-style:inset}.w-e-table-border-style-outset{border-style:outset}
|
|
5
7
|
|
|
6
|
-
.w-e-
|
|
7
|
-
|
|
8
|
-
.w-e-textarea-video-container{background-image:linear-gradient(45deg,#eee 25%,transparent 0,transparent 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0,#fff 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin:10px auto 0;overflow:auto;padding:10px 0;text-align:center}
|
|
8
|
+
.w-e-textarea-video-container{background-image:linear-gradient(45deg,#eee 25%,transparent 0,transparent 75%,#eee 0,#eee),linear-gradient(45deg,#eee 25%,#fff 0,#fff 75%,#eee 0,#eee);background-position:0 0,10px 10px;background-size:20px 20px;border:1px dashed var(--w-e-textarea-border-color);border-radius:5px;margin:10px auto 0;overflow:auto;padding:10px 0;text-align:center}.w-e-video-align-left{text-align:left}.w-e-video-align-center{text-align:center}.w-e-video-align-right{text-align:right}.w-e-video-align-justify{text-align:justify}
|
|
@@ -10,8 +10,8 @@ import './register-builtin-modules/index';
|
|
|
10
10
|
import './init-default-config';
|
|
11
11
|
import Boot from './Boot';
|
|
12
12
|
export { Boot };
|
|
13
|
-
export type { IButtonMenu, IDomEditor, IDropPanelMenu, IEditorConfig, IModalMenu, IModuleConf, ISelectMenu, IToolbarConfig, IUploadConfig, } from '@wangeditor-next/core';
|
|
14
|
-
export { createUploader, DomEditor, genModalButtonElems, genModalInputElems, genModalTextareaElems, i18nAddResources, i18nChangeLanguage, i18nGetResources, t, Toolbar, } from '@wangeditor-next/core';
|
|
13
|
+
export type { ClassStylePolicy, IButtonMenu, IClassStyleUnsupportedPayload, IDomEditor, IDropPanelMenu, IEditorConfig, IModalMenu, IModuleConf, ISelectMenu, IToolbarConfig, IUploadConfig, StyleClassTokenType, TextStyleMode, } from '@wangeditor-next/core';
|
|
14
|
+
export { createUploader, DomEditor, genModalButtonElems, genModalInputElems, genModalTextareaElems, getTextStyleMode, i18nAddResources, i18nChangeLanguage, i18nGetResources, t, Toolbar, } from '@wangeditor-next/core';
|
|
15
15
|
export type { Descendant as SlateDescendant, Location as SlateLocation, } from 'slate';
|
|
16
16
|
export { Editor as SlateEditor, Element as SlateElement, Node as SlateNode, Path as SlatePath, Point as SlatePoint, Range as SlateRange, Text as SlateText, Transforms as SlateTransforms, } from 'slate';
|
|
17
17
|
export { createEditor, createToolbar } from './create';
|