@wangeditor-next/editor 6.3.0 → 6.4.1
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/code-block/menu/CodeBlockMenu.d.ts +1 -0
- package/dist/core/src/create/index.d.ts +2 -1
- package/dist/core/src/editor/interface.d.ts +3 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/table-module/src/module/custom-types.d.ts +3 -2
- package/dist/table-module/src/module/helpers.d.ts +11 -1
- package/dist/table-module/src/module/pre-parse-html.d.ts +1 -1
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @description 自定义 element
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { Descendant } from 'slate';
|
|
6
6
|
export type TableCellProperty = {
|
|
7
7
|
/** 用于设置单元格属性 */
|
|
8
8
|
backgroundColor?: string;
|
|
@@ -18,7 +18,8 @@ export type TableCellElement = {
|
|
|
18
18
|
colSpan?: number;
|
|
19
19
|
rowSpan?: number;
|
|
20
20
|
width?: string;
|
|
21
|
-
|
|
21
|
+
/** Cell content can contain block descendants. Legacy Text[] cells remain supported. */
|
|
22
|
+
children: Descendant[];
|
|
22
23
|
/** 用于设置单元格的 display 属性 */
|
|
23
24
|
hidden?: boolean;
|
|
24
25
|
} & TableCellProperty;
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
* @author wangfupeng
|
|
4
4
|
*/
|
|
5
5
|
import { IDomEditor } from '@wangeditor-next/core';
|
|
6
|
-
import { Element as SlateElement } from 'slate';
|
|
6
|
+
import { Descendant, Element as SlateElement } from 'slate';
|
|
7
7
|
import { TableCellElement, TableElement } from './custom-types';
|
|
8
|
+
export declare function createEmptyTableCell(properties?: Omit<Partial<TableCellElement>, 'type' | 'children'>): TableCellElement;
|
|
9
|
+
export declare function cloneTableCellChildren(children: Descendant[]): Descendant[];
|
|
10
|
+
export declare function normalizeTableCellChildren(children: Descendant[]): Descendant[];
|
|
11
|
+
/**
|
|
12
|
+
* Return whether a block node is safe to keep directly under a table cell.
|
|
13
|
+
* The list is intentionally explicit so arbitrary custom blocks cannot bypass
|
|
14
|
+
* table selection and keyboard invariants by being pasted into a cell.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isSupportedTableCellBlock(editor: IDomEditor, node: Descendant): boolean;
|
|
17
|
+
export declare function normalizeTableContent(content: Descendant[]): Descendant[];
|
|
8
18
|
/**
|
|
9
19
|
* Update a rendered table by its own path instead of relying on the current selection.
|
|
10
20
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { DOMElement } from '../utils/dom';
|
|
6
6
|
/**
|
|
7
|
-
* pre-prase table
|
|
7
|
+
* pre-prase table and remove the tbody wrapper while preserving cell blocks.
|
|
8
8
|
* @param table table elem
|
|
9
9
|
*/
|
|
10
10
|
declare function preParse(tableElem: DOMElement): DOMElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/editor",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"description": "Web rich text editor, Web 富文本编辑器",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wangeditor",
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
"nanoid": "^5.0.0",
|
|
78
78
|
"slate": "^0.124.0",
|
|
79
79
|
"snabbdom": "^3.6.0",
|
|
80
|
-
"@wangeditor-next/basic-modules": "^6.
|
|
81
|
-
"@wangeditor-next/code-highlight": "^6.
|
|
82
|
-
"@wangeditor-next/core": "^6.
|
|
83
|
-
"@wangeditor-next/list-module": "^6.
|
|
84
|
-
"@wangeditor-next/table-module": "^6.
|
|
85
|
-
"@wangeditor-next/upload-image-module": "^6.
|
|
86
|
-
"@wangeditor-next/video-module": "^6.
|
|
80
|
+
"@wangeditor-next/basic-modules": "^6.4.1",
|
|
81
|
+
"@wangeditor-next/code-highlight": "^6.4.1",
|
|
82
|
+
"@wangeditor-next/core": "^6.4.1",
|
|
83
|
+
"@wangeditor-next/list-module": "^6.4.1",
|
|
84
|
+
"@wangeditor-next/table-module": "^6.4.1",
|
|
85
|
+
"@wangeditor-next/upload-image-module": "^6.4.1",
|
|
86
|
+
"@wangeditor-next/video-module": "^6.4.1"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"postcss-merge-rules": "^7.0.6",
|