@wangeditor-next/editor 5.2.1 → 5.2.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/CHANGELOG.md +11 -0
- package/dist/index.esm.js +5 -3
- package/dist/index.js +5 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.2.2](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/editor@5.2.1...@wangeditor-next/editor@5.2.2) (2024-06-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Performance Improvements
|
|
10
|
+
|
|
11
|
+
* **issue 5259:** video element default center ([9c01d40](https://github.com/cycleccc/wangEditor/commit/9c01d4029dd5a63869e737e579f4a0af50650e1e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [5.2.1](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/editor@5.2.0...@wangeditor-next/editor@5.2.1) (2024-05-30)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @wangeditor-next/editor
|
package/dist/index.esm.js
CHANGED
|
@@ -32113,9 +32113,9 @@ var BaseMenu$5 = /** @class */ (function () {
|
|
|
32113
32113
|
return true;
|
|
32114
32114
|
var selectedElems = DomEditor.getSelectedElems(editor);
|
|
32115
32115
|
var notMatch = selectedElems.some(function (elem) {
|
|
32116
|
-
if (Editor.isVoid(editor, elem) && Editor.isBlock(editor, elem))
|
|
32117
|
-
return true;
|
|
32118
32116
|
var type = elem.type;
|
|
32117
|
+
if (Editor.isVoid(editor, elem) && Editor.isBlock(editor, elem) && type !== 'video')
|
|
32118
|
+
return true;
|
|
32119
32119
|
if (['pre', 'code'].includes(type))
|
|
32120
32120
|
return true;
|
|
32121
32121
|
});
|
|
@@ -32139,6 +32139,8 @@ var JustifyLeftMenu = /** @class */ (function (_super) {
|
|
|
32139
32139
|
return _this;
|
|
32140
32140
|
}
|
|
32141
32141
|
JustifyLeftMenu.prototype.exec = function (editor, value) {
|
|
32142
|
+
var selection = editor.selection;
|
|
32143
|
+
console.log('selection', selection);
|
|
32142
32144
|
Transforms.setNodes(editor, {
|
|
32143
32145
|
textAlign: 'left',
|
|
32144
32146
|
}, { match: function (n) { return Element$1.isElement(n) && !editor.isInline(n); } });
|
|
@@ -37383,7 +37385,7 @@ var renderVideoConf = {
|
|
|
37383
37385
|
*/
|
|
37384
37386
|
function videoToHtml(elemNode, childrenHtml) {
|
|
37385
37387
|
var _a = elemNode, _b = _a.src, src = _b === void 0 ? '' : _b, _c = _a.poster, poster = _c === void 0 ? '' : _c, _d = _a.width, width = _d === void 0 ? 'auto' : _d, _e = _a.height, height = _e === void 0 ? 'auto' : _e;
|
|
37386
|
-
var res = '<div data-w-e-type="video" data-w-e-is-void>\n';
|
|
37388
|
+
var res = '<div data-w-e-type="video" data-w-e-is-void style="text-align: center;">\n';
|
|
37387
37389
|
if (src.trim().indexOf('<iframe ') === 0) {
|
|
37388
37390
|
// iframe 形式
|
|
37389
37391
|
var iframeHtml = genSizeStyledIframeHtml(src, width, height);
|
package/dist/index.js
CHANGED
|
@@ -36444,9 +36444,9 @@
|
|
|
36444
36444
|
return true;
|
|
36445
36445
|
var selectedElems = core.DomEditor.getSelectedElems(editor);
|
|
36446
36446
|
var notMatch = selectedElems.some(function (elem) {
|
|
36447
|
-
if (slate.Editor.isVoid(editor, elem) && slate.Editor.isBlock(editor, elem))
|
|
36448
|
-
return true;
|
|
36449
36447
|
var type = elem.type;
|
|
36448
|
+
if (slate.Editor.isVoid(editor, elem) && slate.Editor.isBlock(editor, elem) && type !== 'video')
|
|
36449
|
+
return true;
|
|
36450
36450
|
if (['pre', 'code'].includes(type))
|
|
36451
36451
|
return true;
|
|
36452
36452
|
});
|
|
@@ -36470,6 +36470,8 @@
|
|
|
36470
36470
|
return _this;
|
|
36471
36471
|
}
|
|
36472
36472
|
JustifyLeftMenu.prototype.exec = function (editor, value) {
|
|
36473
|
+
var selection = editor.selection;
|
|
36474
|
+
console.log('selection', selection);
|
|
36473
36475
|
slate.Transforms.setNodes(editor, {
|
|
36474
36476
|
textAlign: 'left',
|
|
36475
36477
|
}, { match: function (n) { return slate.Element.isElement(n) && !editor.isInline(n); } });
|
|
@@ -41772,7 +41774,7 @@
|
|
|
41772
41774
|
*/
|
|
41773
41775
|
function videoToHtml(elemNode, childrenHtml) {
|
|
41774
41776
|
var _a = elemNode, _b = _a.src, src = _b === void 0 ? '' : _b, _c = _a.poster, poster = _c === void 0 ? '' : _c, _d = _a.width, width = _d === void 0 ? 'auto' : _d, _e = _a.height, height = _e === void 0 ? 'auto' : _e;
|
|
41775
|
-
var res = '<div data-w-e-type="video" data-w-e-is-void>\n';
|
|
41777
|
+
var res = '<div data-w-e-type="video" data-w-e-is-void style="text-align: center;">\n';
|
|
41776
41778
|
if (src.trim().indexOf('<iframe ') === 0) {
|
|
41777
41779
|
// iframe 形式
|
|
41778
41780
|
var iframeHtml = genSizeStyledIframeHtml(src, width, height);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wangeditor-next/editor",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.2",
|
|
4
4
|
"description": "Web rich text editor, Web 富文本编辑器",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wangeditor",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@wangeditor-next/list-module": "^1.1.0",
|
|
57
57
|
"@wangeditor-next/table-module": "^1.2.0",
|
|
58
58
|
"@wangeditor-next/upload-image-module": "^1.1.0",
|
|
59
|
-
"@wangeditor-next/video-module": "^1.2.
|
|
59
|
+
"@wangeditor-next/video-module": "^1.2.1",
|
|
60
60
|
"dom7": "^3.0.0",
|
|
61
61
|
"is-hotkey": "^0.2.0",
|
|
62
62
|
"lodash.camelcase": "^4.3.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"slate": "^0.72.0",
|
|
71
71
|
"snabbdom": "^3.1.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e9d26c11145ac5bdaa648177bed8548aa178aaba"
|
|
74
74
|
}
|