@wangeditor-next/plugin-float-image 2.0.4 → 2.0.6
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/locale/en.d.ts +3 -0
- package/dist/basic-modules/src/locale/zh-CN.d.ts +3 -0
- package/dist/basic-modules/src/modules/code-block/menu/index.d.ts +3 -0
- package/dist/basic-modules/src/modules/code-block/render-elem.d.ts +1 -1
- package/dist/basic-modules/src/modules/indent/is-indent-target.d.ts +4 -0
- package/dist/core/src/config/interface.d.ts +8 -2
- package/dist/core/src/editor/interface.d.ts +2 -0
- package/dist/core/src/editor/plugins/with-history.d.ts +7 -0
- package/dist/core/src/to-html/elem2html.d.ts +2 -1
- package/dist/core/src/to-html/node2html.d.ts +6 -2
- package/dist/core/src/to-html/text2html.d.ts +2 -1
- package/dist/core/src/upload/createUploader.d.ts +4 -2
- package/dist/table-module/src/module/custom-types.d.ts +1 -0
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
6
|
import { Element as SlateElement } from 'slate';
|
|
7
7
|
import { VNode } from 'snabbdom';
|
|
8
|
-
declare function renderPre(
|
|
8
|
+
declare function renderPre(elemNode: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode;
|
|
9
9
|
declare function renderCode(_elemNode: SlateElement, children: VNode[] | null, _editor: IDomEditor): VNode;
|
|
10
10
|
export declare const renderPreConf: {
|
|
11
11
|
type: string;
|
|
@@ -95,6 +95,9 @@ interface IInsertTableConfig {
|
|
|
95
95
|
selected: boolean;
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
interface IInsertTableColConfig {
|
|
99
|
+
insertPosition: 'before' | 'after';
|
|
100
|
+
}
|
|
98
101
|
interface ILinkConfig {
|
|
99
102
|
checkLink: (text: string, url: string) => string | boolean | undefined;
|
|
100
103
|
parseLinkUrl: (url: string) => string;
|
|
@@ -115,6 +118,9 @@ interface ICodeLangConfig {
|
|
|
115
118
|
selected?: boolean;
|
|
116
119
|
}[];
|
|
117
120
|
}
|
|
121
|
+
interface ICodeBlockConfig {
|
|
122
|
+
showCopyButton?: boolean;
|
|
123
|
+
}
|
|
118
124
|
export interface IMenuConfig {
|
|
119
125
|
bold: ISingleMenuConfig;
|
|
120
126
|
underline: ISingleMenuConfig;
|
|
@@ -150,7 +156,7 @@ export interface IMenuConfig {
|
|
|
150
156
|
editLink: ILinkConfig;
|
|
151
157
|
unLink: ISingleMenuConfig;
|
|
152
158
|
viewLink: ISingleMenuConfig;
|
|
153
|
-
codeBlock:
|
|
159
|
+
codeBlock: ICodeBlockConfig;
|
|
154
160
|
blockquote: ISingleMenuConfig;
|
|
155
161
|
headerSelect: ISingleMenuConfig;
|
|
156
162
|
header1: ISingleMenuConfig;
|
|
@@ -172,7 +178,7 @@ export interface IMenuConfig {
|
|
|
172
178
|
deleteTable: ISingleMenuConfig;
|
|
173
179
|
insertTableRow: IInsertTableConfig;
|
|
174
180
|
deleteTableRow: ISingleMenuConfig;
|
|
175
|
-
insertTableCol:
|
|
181
|
+
insertTableCol: IInsertTableColConfig;
|
|
176
182
|
deleteTableCol: ISingleMenuConfig;
|
|
177
183
|
tableHeader: ISingleMenuConfig;
|
|
178
184
|
tableFullWidth: ISingleMenuConfig;
|
|
@@ -25,6 +25,7 @@ export interface IDomEditor extends Editor {
|
|
|
25
25
|
alert: (info: string, type: AlertType) => void;
|
|
26
26
|
handleTab: () => void;
|
|
27
27
|
getHtml: () => string;
|
|
28
|
+
getHtmlWithId?: (idKey?: string) => string;
|
|
28
29
|
getText: () => string;
|
|
29
30
|
getSelectionText: () => string;
|
|
30
31
|
getElemsByTypePrefix: (typePrefix: string) => ElementWithId[];
|
|
@@ -69,5 +70,6 @@ export interface IDomEditor extends Editor {
|
|
|
69
70
|
emit: (type: string, ...args: any[]) => void;
|
|
70
71
|
undo?: () => void;
|
|
71
72
|
redo?: () => void;
|
|
73
|
+
clearHistory?: () => void;
|
|
72
74
|
}
|
|
73
75
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description slate 插件 - history
|
|
3
|
+
*/
|
|
4
|
+
import { Editor } from 'slate';
|
|
5
|
+
import { HistoryEditor } from 'slate-history';
|
|
6
|
+
import { IDomEditor } from '../interface';
|
|
7
|
+
export declare const withHistory: <T extends Editor>(editor: T) => T & IDomEditor & HistoryEditor;
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Element } from 'slate';
|
|
6
6
|
import { IDomEditor } from '../editor/interface';
|
|
7
|
-
|
|
7
|
+
import type { INodeToHtmlOptions } from './node2html';
|
|
8
|
+
declare function elemToHtml(elemNode: Element, editor: IDomEditor, options?: INodeToHtmlOptions): string;
|
|
8
9
|
export default elemToHtml;
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
5
|
import { Descendant } from 'slate';
|
|
6
|
-
import { IDomEditor } from '../editor/interface';
|
|
7
|
-
|
|
6
|
+
import type { IDomEditor } from '../editor/interface';
|
|
7
|
+
export interface INodeToHtmlOptions {
|
|
8
|
+
includeId?: boolean;
|
|
9
|
+
idKey?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function node2html(node: Descendant, editor: IDomEditor, options?: INodeToHtmlOptions): string;
|
|
8
12
|
export default node2html;
|
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Text } from 'slate';
|
|
6
6
|
import { IDomEditor } from '../editor/interface';
|
|
7
|
-
|
|
7
|
+
import type { INodeToHtmlOptions } from './node2html';
|
|
8
|
+
declare function textToHtml(textNode: Text, editor: IDomEditor, _options?: INodeToHtmlOptions): string;
|
|
8
9
|
export default textToHtml;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* @description gen uploader
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import type Uppy from '@uppy/core';
|
|
6
5
|
import type { IDomEditor } from '../editor/interface';
|
|
7
6
|
import type { IUploadAdapter, IUploadConfig, IUploader } from './interface';
|
|
8
7
|
type IUploadConfigWithAdapter = IUploadConfig & {
|
|
9
8
|
uploadAdapter: IUploadAdapter;
|
|
10
9
|
};
|
|
11
|
-
|
|
10
|
+
type IDefaultUploader = IUploader & {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
declare function createUploader<T extends IUploadConfig>(config: T, editor?: IDomEditor): T extends IUploadConfigWithAdapter ? IUploader : IDefaultUploader;
|
|
12
14
|
export default createUploader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/plugin-float-image",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "wangEditor float image plugin",
|
|
5
5
|
"author": "cycleccc <2991205548@qq.com>",
|
|
6
6
|
"type": "module",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"url": "https://github.com/wangeditor-next/wangeditor-next/issues"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@wangeditor-next/editor": "5.7.
|
|
37
|
+
"@wangeditor-next/editor": "5.7.6",
|
|
38
38
|
"dom7": "^3.0.0 || ^4.0.0",
|
|
39
|
-
"slate": "^0.
|
|
39
|
+
"slate": "^0.124.0",
|
|
40
40
|
"snabbdom": "^3.6.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|