jodit 4.0.0-beta.94 → 4.0.0-beta.98

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.
Files changed (99) hide show
  1. package/CHANGELOG.md +13 -5
  2. package/README.md +5 -5
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +89 -73
  6. package/es2015/jodit.min.js +2 -2
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.css +1 -1
  13. package/es2018/jodit.fat.min.js +2 -2
  14. package/es2018/jodit.js +89 -73
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.js +1 -1
  17. package/es2018/plugins/debug/debug.min.js +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  21. package/es2021/jodit.css +1 -1
  22. package/es2021/jodit.fat.min.js +2 -2
  23. package/es2021/jodit.js +89 -73
  24. package/es2021/jodit.min.js +2 -2
  25. package/es2021/plugins/debug/debug.js +1 -1
  26. package/es2021/plugins/debug/debug.min.js +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  28. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  30. package/es2021.en/jodit.css +1 -1
  31. package/es2021.en/jodit.fat.min.js +2 -2
  32. package/es2021.en/jodit.js +89 -73
  33. package/es2021.en/jodit.min.js +2 -2
  34. package/es2021.en/plugins/debug/debug.js +1 -1
  35. package/es2021.en/plugins/debug/debug.min.js +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  38. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  39. package/es5/jodit.css +2 -2
  40. package/es5/jodit.fat.min.js +2 -2
  41. package/es5/jodit.js +93 -73
  42. package/es5/jodit.min.css +2 -2
  43. package/es5/jodit.min.js +2 -2
  44. package/es5/plugins/debug/debug.js +1 -1
  45. package/es5/plugins/debug/debug.min.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  47. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  48. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  49. package/esm/core/constants.js +1 -1
  50. package/esm/core/helpers/string/ucfirst.js +1 -1
  51. package/esm/core/helpers/utils/index.d.ts +0 -1
  52. package/esm/core/helpers/utils/index.js +0 -1
  53. package/esm/core/selection/interface.d.ts +1 -1
  54. package/esm/core/ui/form/inputs/area/area.d.ts +1 -1
  55. package/esm/core/ui/form/inputs/area/area.js +1 -1
  56. package/esm/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  57. package/esm/core/ui/form/inputs/checkbox/checkbox.js +1 -1
  58. package/esm/core/ui/form/inputs/file/file.d.ts +1 -1
  59. package/esm/core/ui/form/inputs/file/file.js +1 -1
  60. package/esm/core/ui/form/inputs/index.d.ts +1 -1
  61. package/esm/core/ui/form/inputs/index.js +1 -1
  62. package/esm/core/ui/form/inputs/input/input.d.ts +1 -1
  63. package/esm/core/ui/form/inputs/input/input.js +1 -1
  64. package/esm/core/ui/form/inputs/select/select.d.ts +1 -1
  65. package/esm/core/ui/form/inputs/select/select.js +1 -1
  66. package/esm/core/view/view.d.ts +1 -0
  67. package/esm/core/view/view.js +4 -1
  68. package/esm/jodit.d.ts +2 -1
  69. package/esm/jodit.js +6 -0
  70. package/esm/modules/messages/messages.d.ts +28 -0
  71. package/esm/modules/messages/messages.js +28 -0
  72. package/esm/modules/table/table.d.ts +4 -2
  73. package/esm/modules/table/table.js +2 -0
  74. package/esm/modules/uploader/helpers/send.js +6 -1
  75. package/esm/modules/widget/color-picker/color-picker.d.ts +1 -1
  76. package/esm/modules/widget/color-picker/color-picker.js +1 -1
  77. package/esm/modules/widget/file-selector/file-selector.d.ts +1 -18
  78. package/esm/modules/widget/file-selector/file-selector.js +12 -19
  79. package/esm/modules/widget/tabs/tabs.d.ts +17 -6
  80. package/esm/modules/widget/tabs/tabs.js +17 -6
  81. package/package.json +1 -1
  82. package/types/core/helpers/utils/index.d.ts +0 -1
  83. package/types/core/selection/interface.d.ts +1 -1
  84. package/types/core/ui/form/inputs/area/area.d.ts +1 -1
  85. package/types/core/ui/form/inputs/checkbox/checkbox.d.ts +1 -1
  86. package/types/core/ui/form/inputs/file/file.d.ts +1 -1
  87. package/types/core/ui/form/inputs/index.d.ts +1 -1
  88. package/types/core/ui/form/inputs/input/input.d.ts +1 -1
  89. package/types/core/ui/form/inputs/select/select.d.ts +1 -1
  90. package/types/core/view/view.d.ts +1 -0
  91. package/types/jodit.d.ts +2 -1
  92. package/types/modules/messages/messages.d.ts +28 -0
  93. package/types/modules/table/table.d.ts +4 -2
  94. package/types/modules/widget/color-picker/color-picker.d.ts +1 -1
  95. package/types/modules/widget/file-selector/file-selector.d.ts +1 -18
  96. package/types/modules/widget/tabs/tabs.d.ts +17 -6
  97. package/esm/core/helpers/utils/val.d.ts +0 -9
  98. package/esm/core/helpers/utils/val.js +0 -18
  99. package/types/core/helpers/utils/val.d.ts +0 -9
package/es2015/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.0.0-beta.94
4
+ * Version: v4.0.0-beta.98
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1715,7 +1715,7 @@ __webpack_require__.r(__webpack_exports__);
1715
1715
  * Released under MIT see LICENSE.txt in the project root for license information.
1716
1716
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1717
1717
  */
1718
- const APP_VERSION = "4.0.0-beta.94";
1718
+ const APP_VERSION = "4.0.0-beta.98";
1719
1719
  // prettier-ignore
1720
1720
  const ES = "es2015";
1721
1721
  const IS_ES_MODERN = true;
@@ -7058,7 +7058,7 @@ function ucfirst(value) {
7058
7058
  if (!value.length) {
7059
7059
  return '';
7060
7060
  }
7061
- return value[0].toUpperCase() + value.substr(1);
7061
+ return value[0].toUpperCase() + value.substring(1);
7062
7062
  }
7063
7063
 
7064
7064
 
@@ -8216,8 +8216,7 @@ __webpack_require__.r(__webpack_exports__);
8216
8216
  /* harmony export */ reset: function() { return /* reexport safe */ _reset__WEBPACK_IMPORTED_MODULE_21__.m; },
8217
8217
  /* harmony export */ resolveElement: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.W2; },
8218
8218
  /* harmony export */ scrollIntoViewIfNeeded: function() { return /* reexport safe */ _scroll_into_view__WEBPACK_IMPORTED_MODULE_22__.n; },
8219
- /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; },
8220
- /* harmony export */ val: function() { return /* reexport safe */ _val__WEBPACK_IMPORTED_MODULE_27__.P; }
8219
+ /* harmony export */ set: function() { return /* reexport safe */ _set__WEBPACK_IMPORTED_MODULE_24__.t; }
8221
8220
  /* harmony export */ });
8222
8221
  /* harmony import */ var _align__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13931);
8223
8222
  /* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23144);
@@ -8250,7 +8249,6 @@ __webpack_require__.r(__webpack_exports__);
8250
8249
  /* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(49155);
8251
8250
  /* harmony import */ var _stack__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(56114);
8252
8251
  /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(87398);
8253
- /* harmony import */ var _val__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(96416);
8254
8252
  /*!
8255
8253
  * Jodit Editor (https://xdsoft.net/jodit/)
8256
8254
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -8286,7 +8284,6 @@ __webpack_require__.r(__webpack_exports__);
8286
8284
 
8287
8285
 
8288
8286
 
8289
-
8290
8287
 
8291
8288
 
8292
8289
  /***/ }),
@@ -9004,35 +9001,6 @@ const getDataTransfer = (event) => {
9004
9001
  };
9005
9002
 
9006
9003
 
9007
- /***/ }),
9008
-
9009
- /***/ 96416:
9010
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9011
-
9012
- "use strict";
9013
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9014
- /* harmony export */ P: function() { return /* binding */ val; }
9015
- /* harmony export */ });
9016
- /*!
9017
- * Jodit Editor (https://xdsoft.net/jodit/)
9018
- * Released under MIT see LICENSE.txt in the project root for license information.
9019
- * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
9020
- */
9021
- /**
9022
- * @module helpers/utils
9023
- */
9024
- const val = (elm, selector, value) => {
9025
- const child = elm.querySelector(selector);
9026
- if (!child) {
9027
- return '';
9028
- }
9029
- if (value) {
9030
- child.value = value;
9031
- }
9032
- return child.value;
9033
- };
9034
-
9035
-
9036
9004
  /***/ }),
9037
9005
 
9038
9006
  /***/ 97800:
@@ -13738,7 +13706,7 @@ UIForm = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
13738
13706
  var UITextArea_1;
13739
13707
 
13740
13708
  /**
13741
- * @module ui/form/inputs
13709
+ * @module ui/form
13742
13710
  */
13743
13711
 
13744
13712
 
@@ -13788,7 +13756,7 @@ UITextArea = UITextArea_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate
13788
13756
  var UICheckbox_1;
13789
13757
 
13790
13758
  /**
13791
- * @module ui/form/inputs
13759
+ * @module ui/form
13792
13760
  */
13793
13761
 
13794
13762
 
@@ -13873,7 +13841,7 @@ UICheckbox = UICheckbox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate
13873
13841
  */
13874
13842
 
13875
13843
  /**
13876
- * @module ui/form/inputs
13844
+ * @module ui/form
13877
13845
  */
13878
13846
 
13879
13847
 
@@ -13943,7 +13911,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
13943
13911
  * Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
13944
13912
  */
13945
13913
  /**
13946
- * @module ui/form/inputs
13914
+ * @module ui/form
13947
13915
  */
13948
13916
 
13949
13917
 
@@ -13977,7 +13945,7 @@ UIFileInput = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
13977
13945
  var UIInput_1;
13978
13946
 
13979
13947
  /**
13980
- * @module ui/form/inputs
13948
+ * @module ui/form
13981
13949
  */
13982
13950
 
13983
13951
 
@@ -14218,7 +14186,7 @@ UIInput = UIInput_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn
14218
14186
  var UISelect_1;
14219
14187
 
14220
14188
  /**
14221
- * @module ui/form/inputs
14189
+ * @module ui/form
14222
14190
  */
14223
14191
 
14224
14192
 
@@ -15767,7 +15735,10 @@ let View = View_1 = class View extends jodit_modules__WEBPACK_IMPORTED_MODULE_3_
15767
15735
  return jodit_core_storage__WEBPACK_IMPORTED_MODULE_0__/* .Storage */ .Ke.makeStorage();
15768
15736
  }
15769
15737
  get message() {
15770
- return new jodit_modules_messages_messages__WEBPACK_IMPORTED_MODULE_8__/* .UIMessages */ .D(this, this.container);
15738
+ return this.getMessageModule(this.container);
15739
+ }
15740
+ getMessageModule(container) {
15741
+ return new jodit_modules_messages_messages__WEBPACK_IMPORTED_MODULE_8__/* .UIMessages */ .D(this, container);
15771
15742
  }
15772
15743
  /**
15773
15744
  * Container for persistent set/get value
@@ -16159,6 +16130,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
16159
16130
  get workplace() {
16160
16131
  return this.currentPlace.workplace;
16161
16132
  }
16133
+ get message() {
16134
+ return this.getMessageModule(this.workplace);
16135
+ }
16162
16136
  /**
16163
16137
  * Statusbar module
16164
16138
  */
@@ -17243,6 +17217,9 @@ Jodit.core = {
17243
17217
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
17244
17218
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
17245
17219
  ], Jodit.prototype, "createInside", null);
17220
+ (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
17221
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
17222
+ ], Jodit.prototype, "message", null);
17246
17223
  (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .gn)([
17247
17224
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
17248
17225
  ], Jodit.prototype, "s", null);
@@ -21808,15 +21785,43 @@ let UIMessages = class UIMessages extends jodit_core_ui_group_group__WEBPACK_IMP
21808
21785
  this.options = options;
21809
21786
  this.__messages = new Set();
21810
21787
  }
21788
+ /**
21789
+ * Show popup info message in the lower right corner of the container
21790
+ * ```js
21791
+ * const jodit = Jodit.make('#editor');
21792
+ * jodit.info('Hello world', 3000);
21793
+ * ```
21794
+ */
21811
21795
  info(text, timeout) {
21812
21796
  this.__message(text, 'info', timeout);
21813
21797
  }
21798
+ /**
21799
+ * Show popup success message in the lower right corner of the container
21800
+ * ```js
21801
+ * const jodit = Jodit.make('#editor');
21802
+ * jodit.success('Hello world', 3000);
21803
+ * ```
21804
+ */
21814
21805
  success(text, timeout) {
21815
21806
  this.__message(text, 'success', timeout);
21816
21807
  }
21808
+ /**
21809
+ * Show popup error message in the lower right corner of the container
21810
+ * ```js
21811
+ * const jodit = Jodit.make('#editor');
21812
+ * jodit.error('Hello world', 3000);
21813
+ * ```
21814
+ */
21817
21815
  error(text, timeout) {
21818
21816
  this.__message(text, 'error', timeout);
21819
21817
  }
21818
+ /**
21819
+ * Show popup message in the lower right corner of the container
21820
+ * ```js
21821
+ * const jodit = Jodit.make('#editor');
21822
+ * jodit.message('Hello world', 'info', 3000);
21823
+ * ```
21824
+ */
21820
21825
  message(text, variant, timeout) {
21821
21826
  this.__message(text, variant, timeout);
21822
21827
  }
@@ -22146,9 +22151,11 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_3__/* .ViewCom
22146
22151
  /**
22147
22152
  * Inserts a new line after row what contains the selected cell
22148
22153
  *
22154
+ * @param table - Working table
22149
22155
  * @param line - Insert a new line after/before this
22150
22156
  * line contains the selected cell
22151
22157
  * @param after - Insert a new line after line contains the selected cell
22158
+ * @param create - Instance of Create class
22152
22159
  */
22153
22160
  static appendRow(table, line, after, create) {
22154
22161
  var _a;
@@ -23978,7 +23985,12 @@ function send(uploader, data) {
23978
23985
  .send()
23979
23986
  .then(resp => resp.json())
23980
23987
  .catch(error => {
23981
- uploader.o.error.call(uploader, error);
23988
+ return {
23989
+ success: false,
23990
+ data: {
23991
+ messages: [error]
23992
+ }
23993
+ };
23982
23994
  })
23983
23995
  .finally(() => {
23984
23996
  ajax.destruct();
@@ -24245,7 +24257,7 @@ jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .JO.set('palette', (_palet
24245
24257
  * @param coldColor - Color value ex. #fff or rgb(123, 123, 123) or rgba(123, 123, 123, 1)
24246
24258
  * @example
24247
24259
  * ```javascript
24248
- * $tabs = TabsWidget(editor, {
24260
+ * const tabs = TabsWidget(editor, {
24249
24261
  * 'Text' : ColorPickerWidget(editor, function (color) {
24250
24262
  * box.style.color = color;
24251
24263
  * }, box.style.color),
@@ -24345,27 +24357,10 @@ const ColorPickerWidget = (editor, callback, coldColor) => {
24345
24357
  * Generate 3 tabs
24346
24358
  * upload - Use Drag and Drop
24347
24359
  * url - By specifying the image url
24348
- * filebrowser - After opening the file browser . In the absence of one of the parameters will be less tabs
24360
+ * filebrowser - After opening the file browser. In the absence of one of the parameters will be less tabs
24349
24361
  *
24350
24362
  * @param callbacks - Object with keys `url`, `upload` and `filebrowser`, values which are callback
24351
24363
  * functions with different parameters
24352
- *
24353
- * @example
24354
- * ```javascript
24355
- * let widget = new Jodit.modules.Widget(editor);
24356
- *
24357
- * return widget.c('ImageSelector', {
24358
- * url: function (url, alt) {
24359
- * editor.selections.insertImage(url);
24360
- * },
24361
- * upload: function (images) {
24362
- * editor.selections.insertImage(images[0]);
24363
- * },
24364
- * filebrowser: function (images) {
24365
- * editor.selections.insertImage(images[0]);
24366
- * }
24367
- * }, image);
24368
- * ```
24369
24364
  */
24370
24365
  const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24371
24366
  let currentImage;
@@ -24434,13 +24429,13 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24434
24429
  !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isText(elm) &&
24435
24430
  (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'img') || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm).length)) {
24436
24431
  currentImage = elm.tagName === 'IMG' ? elm : (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.$$)('img', elm)[0];
24437
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
24438
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
24432
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'src'));
24433
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(currentImage, 'alt'));
24439
24434
  button.state.text = 'Update';
24440
24435
  }
24441
24436
  if (elm && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .i.isTag(elm, 'a')) {
24442
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
24443
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.val)(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
24437
+ val(form.container, 'input[name=url]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'href'));
24438
+ val(form.container, 'input[name=text]', (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.attr)(elm, 'title'));
24444
24439
  button.state.text = 'Update';
24445
24440
  }
24446
24441
  form.onSubmit(data => {
@@ -24456,6 +24451,16 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24456
24451
  }
24457
24452
  return (0,jodit_modules_widget_tabs_tabs__WEBPACK_IMPORTED_MODULE_3__/* .TabsWidget */ .I)(editor, tabs);
24458
24453
  };
24454
+ function val(elm, selector, value) {
24455
+ const child = elm.querySelector(selector);
24456
+ if (!child) {
24457
+ return '';
24458
+ }
24459
+ if (value) {
24460
+ child.value = value;
24461
+ }
24462
+ return child.value;
24463
+ }
24459
24464
 
24460
24465
 
24461
24466
  /***/ }),
@@ -24525,12 +24530,23 @@ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
24525
24530
  *
24526
24531
  * @example
24527
24532
  * ```javascript
24528
- * let tabs = Jodit.modules.TabsWidget(editor, [
24529
- * {name: 'Images', content: '<div>Images</div>'},
24530
- * {name: 'Title 2': Jodit.modules.Helpers.dom('<div>Some content</div>')},
24531
- * {name: 'Color Picker': ColorPickerWidget(editor, function (color) {
24532
- * box.style.color = color;
24533
- * }, box.style.color)},
24533
+ * const editor = Jodit.make('#editor');
24534
+ * const tabs = Jodit.modules.TabsWidget(editor, [
24535
+ * { name: 'Images', content: '<div>Images</div>' },
24536
+ * {
24537
+ * name: 'Title 2',
24538
+ * content: editor.c.fromHTML('<div>Some content</div>')
24539
+ * },
24540
+ * {
24541
+ * name: 'Color Picker',
24542
+ * content: ColorPickerWidget(
24543
+ * editor,
24544
+ * function (color) {
24545
+ * box.style.color = color;
24546
+ * },
24547
+ * box.style.color
24548
+ * )
24549
+ * }
24534
24550
  * ]);
24535
24551
  * ```
24536
24552
  */