@wangeditor-next/editor 5.2.1 → 5.2.3

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 CHANGED
@@ -3,6 +3,28 @@
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.3](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/editor@5.2.2...@wangeditor-next/editor@5.2.3) (2024-06-08)
7
+
8
+
9
+ ### Performance Improvements
10
+
11
+ * **issue 13:** add replace icon svg by menu config ([a897f58](https://github.com/cycleccc/wangEditor/commit/a897f58fd85a7f8f4bd1e6ad1cd114457eebaf13))
12
+
13
+
14
+
15
+
16
+
17
+ ## [5.2.2](https://github.com/cycleccc/wangEditor/compare/@wangeditor-next/editor@5.2.1...@wangeditor-next/editor@5.2.2) (2024-06-04)
18
+
19
+
20
+ ### Performance Improvements
21
+
22
+ * **issue 5259:** video element default center ([9c01d40](https://github.com/cycleccc/wangEditor/commit/9c01d4029dd5a63869e737e579f4a0af50650e1e))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [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
29
 
8
30
  **Note:** Version bump only for package @wangeditor-next/editor
package/README.md CHANGED
@@ -10,5 +10,4 @@
10
10
  ![](../../docs/images/editor.png)
11
11
 
12
12
  交流
13
- - [提交问题和建议](https://github.com/cycleccc/wangEditor/issues)
14
- - 加入 QQ 群([官网](https://www.wangeditor.com/)有群号)
13
+ - [提交问题和建议](https://github.com/cycleccc/wangEditor-next/issues)
package/dist/index.esm.js CHANGED
@@ -24184,6 +24184,12 @@ var HoverBar = /** @class */ (function () {
24184
24184
  menu = factory();
24185
24185
  menus[key] = menu;
24186
24186
  }
24187
+ //替换 icon svg
24188
+ var menuConf = editor.getMenuConfig(key);
24189
+ console.log('🚀 ~ HoverBar ~ registerSingleItem ~ menuConf:', menuConf, menu);
24190
+ if (menuConf && menuConf.iconSvg !== undefined) {
24191
+ menu.iconSvg = menuConf.iconSvg;
24192
+ }
24187
24193
  var barItem = createBarItem(key, menu);
24188
24194
  this.hoverbarItems.push(barItem);
24189
24195
  // 保存 barItem 和 editor 的关系
@@ -24598,6 +24604,11 @@ var Toolbar = /** @class */ (function () {
24598
24604
  else {
24599
24605
  console.warn("Duplicated toolbar menu key '" + key + "'\n\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '" + key + "'");
24600
24606
  }
24607
+ // 替换 icon svg
24608
+ var menuConf = editor.getMenuConfig(key);
24609
+ if (menuConf && menuConf.iconSvg !== undefined) {
24610
+ menu.iconSvg = menuConf.iconSvg;
24611
+ }
24601
24612
  var toolbarItem = createBarItem(key, menu, inGroup);
24602
24613
  this.toolbarItems.push(toolbarItem);
24603
24614
  // 保存 toolbarItem 和 editor 的关系
@@ -37383,7 +37394,7 @@ var renderVideoConf = {
37383
37394
  */
37384
37395
  function videoToHtml(elemNode, childrenHtml) {
37385
37396
  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';
37397
+ var res = '<div data-w-e-type="video" data-w-e-is-void style="text-align: center;">\n';
37387
37398
  if (src.trim().indexOf('<iframe ') === 0) {
37388
37399
  // iframe 形式
37389
37400
  var iframeHtml = genSizeStyledIframeHtml(src, width, height);
@@ -37432,7 +37443,7 @@ function preParse(elem) {
37432
37443
  var $parent = $video.parent();
37433
37444
  if ($parent.attr('data-w-e-type') === 'video')
37434
37445
  return $video[0];
37435
- var $container = $("<div data-w-e-type=\"video\" data-w-e-is-void></div>");
37446
+ var $container = $("<div data-w-e-type=\"video\" data-w-e-is-void style=\"text-align: center;\"></div>");
37436
37447
  $container.append($video);
37437
37448
  return $container[0];
37438
37449
  }
package/dist/index.js CHANGED
@@ -28399,6 +28399,12 @@
28399
28399
  menu = factory();
28400
28400
  menus[key] = menu;
28401
28401
  }
28402
+ //替换 icon svg
28403
+ var menuConf = editor.getMenuConfig(key);
28404
+ console.log('🚀 ~ HoverBar ~ registerSingleItem ~ menuConf:', menuConf, menu);
28405
+ if (menuConf && menuConf.iconSvg !== undefined) {
28406
+ menu.iconSvg = menuConf.iconSvg;
28407
+ }
28402
28408
  var barItem = createBarItem(key, menu);
28403
28409
  this.hoverbarItems.push(barItem);
28404
28410
  // 保存 barItem 和 editor 的关系
@@ -28813,6 +28819,11 @@
28813
28819
  else {
28814
28820
  console.warn("Duplicated toolbar menu key '" + key + "'\n\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '" + key + "'");
28815
28821
  }
28822
+ // 替换 icon svg
28823
+ var menuConf = editor.getMenuConfig(key);
28824
+ if (menuConf && menuConf.iconSvg !== undefined) {
28825
+ menu.iconSvg = menuConf.iconSvg;
28826
+ }
28816
28827
  var toolbarItem = createBarItem(key, menu, inGroup);
28817
28828
  this.toolbarItems.push(toolbarItem);
28818
28829
  // 保存 toolbarItem 和 editor 的关系
@@ -41772,7 +41783,7 @@
41772
41783
  */
41773
41784
  function videoToHtml(elemNode, childrenHtml) {
41774
41785
  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';
41786
+ var res = '<div data-w-e-type="video" data-w-e-is-void style="text-align: center;">\n';
41776
41787
  if (src.trim().indexOf('<iframe ') === 0) {
41777
41788
  // iframe 形式
41778
41789
  var iframeHtml = genSizeStyledIframeHtml(src, width, height);
@@ -41821,7 +41832,7 @@
41821
41832
  var $parent = $video.parent();
41822
41833
  if ($parent.attr('data-w-e-type') === 'video')
41823
41834
  return $video[0];
41824
- var $container = $__default["default"]("<div data-w-e-type=\"video\" data-w-e-is-void></div>");
41835
+ var $container = $__default["default"]("<div data-w-e-type=\"video\" data-w-e-is-void style=\"text-align: center;\"></div>");
41825
41836
  $container.append($video);
41826
41837
  return $container[0];
41827
41838
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wangeditor-next/editor",
3
- "version": "5.2.1",
3
+ "version": "5.2.3",
4
4
  "description": "Web rich text editor, Web 富文本编辑器",
5
5
  "keywords": [
6
6
  "wangeditor",
@@ -52,11 +52,11 @@
52
52
  "@uppy/xhr-upload": "^2.0.3",
53
53
  "@wangeditor-next/basic-modules": "^1.2.0",
54
54
  "@wangeditor-next/code-highlight": "^1.2.0",
55
- "@wangeditor-next/core": "^1.2.0",
55
+ "@wangeditor-next/core": "^1.2.1",
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.0",
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": "6ad53c2c97f0cacf3175654b34e687cd5363be21"
73
+ "gitHead": "1663dd8bfd594cb29bc2f8c5ef3d4019931bc40f"
74
74
  }