@wangeditor-next/editor 5.7.0 → 5.7.2
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/README.md +48 -0
- package/dist/core/src/config/interface.d.ts +1 -1
- package/dist/core/src/editor/dom-editor.d.ts +9 -0
- package/dist/core/src/index.d.ts +11 -1
- package/dist/core/src/upload.d.ts +5 -0
- package/dist/core.js +13 -0
- package/dist/core.js.map +1 -0
- package/dist/core.mjs +13 -0
- package/dist/core.mjs.map +1 -0
- package/dist/editor/src/core.d.ts +54 -0
- package/dist/editor/src/index.d.ts +3 -2
- package/dist/editor/src/upload.d.ts +6 -0
- package/dist/index.js +18 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/table-module/src/module/column-resize.d.ts +1 -1
- package/dist/table-module/src/module/custom-types.d.ts +1 -0
- package/dist/upload.js +13 -0
- package/dist/upload.js.map +1 -0
- package/dist/upload.mjs +13 -0
- package/dist/upload.mjs.map +1 -0
- package/package.json +18 -8
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description lightweight editor entry
|
|
3
|
+
* @author cycleccc
|
|
4
|
+
*/
|
|
5
|
+
import './assets/index.less';
|
|
6
|
+
import './utils/browser-polyfill';
|
|
7
|
+
import './utils/node-polyfill';
|
|
8
|
+
import './locale/index';
|
|
9
|
+
import type { IDomEditor, IEditorConfig, IModuleConf, IToolbarConfig, Toolbar } from '@wangeditor-next/core';
|
|
10
|
+
import Boot from './Boot';
|
|
11
|
+
import type { ICreateEditorOption, ICreateToolbarOption } from './create';
|
|
12
|
+
import { createEditor as rawCreateEditor, createToolbar as rawCreateToolbar } from './create';
|
|
13
|
+
export { Boot };
|
|
14
|
+
export interface IEditorExtension {
|
|
15
|
+
key?: string;
|
|
16
|
+
module: Partial<IModuleConf>;
|
|
17
|
+
}
|
|
18
|
+
export type EditorExtension = Partial<IModuleConf> | IEditorExtension;
|
|
19
|
+
export interface ICreateEditorFactoryOption {
|
|
20
|
+
extensions?: EditorExtension[];
|
|
21
|
+
editorConfig?: Partial<IEditorConfig>;
|
|
22
|
+
toolbarConfig?: Partial<IToolbarConfig>;
|
|
23
|
+
}
|
|
24
|
+
export type ICreateToolbarWithEditorOption = Omit<ICreateToolbarOption, 'editor'>;
|
|
25
|
+
export interface ICreateWithFactoryOption {
|
|
26
|
+
editor?: Partial<ICreateEditorOption>;
|
|
27
|
+
toolbar?: ICreateToolbarWithEditorOption;
|
|
28
|
+
}
|
|
29
|
+
export interface IEditorFactory {
|
|
30
|
+
create: (option?: ICreateWithFactoryOption) => {
|
|
31
|
+
editor: IDomEditor;
|
|
32
|
+
toolbar: Toolbar | null;
|
|
33
|
+
};
|
|
34
|
+
createEditor: (option?: Partial<ICreateEditorOption>) => IDomEditor;
|
|
35
|
+
createToolbar: (option: ICreateToolbarOption) => Toolbar;
|
|
36
|
+
registerExtensions: (extensions: EditorExtension[]) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Register extensions (modules) once.
|
|
40
|
+
* Similar to tiptap's extensions list, this helper avoids duplicate registration
|
|
41
|
+
* when the same module reference (or explicit extension key) is reused.
|
|
42
|
+
*/
|
|
43
|
+
export declare function registerExtensions(extensions?: EditorExtension[]): void;
|
|
44
|
+
/**
|
|
45
|
+
* Create a reusable factory for on-demand composition, close to tiptap's setup style.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createEditorFactory(option?: ICreateEditorFactoryOption): IEditorFactory;
|
|
48
|
+
export { rawCreateEditor as createEditor, rawCreateToolbar as createToolbar };
|
|
49
|
+
export type { ClassStylePolicy, IButtonMenu, IClassStyleUnsupportedPayload, IDomEditor, IDropPanelMenu, IEditorConfig, IModalMenu, IModuleConf, IOption, ISelectMenu, IToolbarConfig, StyleClassTokenType, TextStyleMode, } from '@wangeditor-next/core';
|
|
50
|
+
export { DomEditor, genModalButtonElems, genModalInputElems, genModalTextareaElems, getClassStylePolicy, getTextStyleMode, i18nAddResources, i18nChangeLanguage, i18nGetResources, reportUnsupportedClassStyle, t, Toolbar, } from '@wangeditor-next/core';
|
|
51
|
+
export type { Descendant as SlateDescendant, Location as SlateLocation, } from 'slate';
|
|
52
|
+
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';
|
|
53
|
+
declare const _default: {};
|
|
54
|
+
export default _default;
|
|
@@ -10,8 +10,9 @@ import './register-builtin-modules/index';
|
|
|
10
10
|
import './init-default-config';
|
|
11
11
|
import Boot from './Boot';
|
|
12
12
|
export { Boot };
|
|
13
|
-
export type { ClassStylePolicy, IButtonMenu, IClassStyleUnsupportedPayload, IDomEditor, IDropPanelMenu, IEditorConfig, IModalMenu, IModuleConf, ISelectMenu, IToolbarConfig, IUploadConfig, StyleClassTokenType, TextStyleMode, } from '@wangeditor-next/core';
|
|
14
|
-
export {
|
|
13
|
+
export type { ClassStylePolicy, IButtonMenu, IClassStyleUnsupportedPayload, IDomEditor, IDropPanelMenu, IEditorConfig, IModalMenu, IModuleConf, IOption, ISelectMenu, IToolbarConfig, IUploadConfig, StyleClassTokenType, TextStyleMode, } from '@wangeditor-next/core';
|
|
14
|
+
export { DomEditor, genModalButtonElems, genModalInputElems, genModalTextareaElems, getClassStylePolicy, getTextStyleMode, i18nAddResources, i18nChangeLanguage, i18nGetResources, reportUnsupportedClassStyle, t, Toolbar, } from '@wangeditor-next/core';
|
|
15
|
+
export { createUploader } from '@wangeditor-next/core/upload';
|
|
15
16
|
export type { Descendant as SlateDescendant, Location as SlateLocation, } from 'slate';
|
|
16
17
|
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
18
|
export { createEditor, createToolbar } from './create';
|