jodit 4.2.43 → 4.2.46

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 (79) hide show
  1. package/CHANGELOG.md +855 -806
  2. package/es2015/jodit.css +5 -7
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +47 -15
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +2 -2
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.css +5 -7
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +47 -14
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.css +1 -1
  21. package/es2018/plugins/debug/debug.js +1 -1
  22. package/es2018/plugins/debug/debug.min.js +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021/jodit.css +5 -7
  27. package/es2021/jodit.fat.min.css +1 -1
  28. package/es2021/jodit.fat.min.js +2 -2
  29. package/es2021/jodit.js +47 -14
  30. package/es2021/jodit.min.css +1 -1
  31. package/es2021/jodit.min.js +2 -2
  32. package/es2021/plugins/debug/debug.css +1 -1
  33. package/es2021/plugins/debug/debug.js +1 -1
  34. package/es2021/plugins/debug/debug.min.js +1 -1
  35. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  37. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  38. package/es2021.en/jodit.css +5 -7
  39. package/es2021.en/jodit.fat.min.css +1 -1
  40. package/es2021.en/jodit.fat.min.js +2 -2
  41. package/es2021.en/jodit.js +47 -14
  42. package/es2021.en/jodit.min.css +1 -1
  43. package/es2021.en/jodit.min.js +2 -2
  44. package/es2021.en/plugins/debug/debug.css +1 -1
  45. package/es2021.en/plugins/debug/debug.js +1 -1
  46. package/es2021.en/plugins/debug/debug.min.js +1 -1
  47. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  48. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  49. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  50. package/es5/164.fat.min.js +1 -1
  51. package/es5/164.min.js +1 -1
  52. package/es5/5.fat.min.js +1 -1
  53. package/es5/5.min.js +1 -1
  54. package/es5/jodit.css +35 -66
  55. package/es5/jodit.fat.min.css +1 -1
  56. package/es5/jodit.fat.min.js +2 -2
  57. package/es5/jodit.js +47 -15
  58. package/es5/jodit.min.css +3 -3
  59. package/es5/jodit.min.js +2 -2
  60. package/es5/plugins/debug/debug.css +1 -1
  61. package/es5/plugins/debug/debug.js +1 -1
  62. package/es5/plugins/debug/debug.min.js +1 -1
  63. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  64. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  65. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  66. package/esm/core/constants.js +1 -1
  67. package/esm/core/helpers/utils/config-proto.d.ts +18 -0
  68. package/esm/core/helpers/utils/config-proto.js +25 -0
  69. package/esm/core/traits/dlgs.js +1 -0
  70. package/esm/jodit.js +3 -7
  71. package/esm/modules/dialog/dialog.js +4 -0
  72. package/esm/plugins/source/editor/engines/ace.js +4 -0
  73. package/esm/plugins/source/editor/engines/area.js +2 -1
  74. package/esm/types/view.d.ts +1 -0
  75. package/package.json +1 -1
  76. package/types/core/helpers/utils/config-proto.d.ts +18 -0
  77. package/types/types/view.d.ts +1 -0
  78. package/esm/polyfills.d.ts +0 -10
  79. package/types/polyfills.d.ts +0 -10
package/es2018/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.43
4
+ * Version: v4.2.46
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1735,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
1735
1735
  * Released under MIT see LICENSE.txt in the project root for license information.
1736
1736
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1737
1737
  */
1738
- const APP_VERSION = "4.2.43";
1738
+ const APP_VERSION = "4.2.46";
1739
1739
  // prettier-ignore
1740
1740
  const ES = "es2018";
1741
1741
  const IS_ES_MODERN = true;
@@ -7569,8 +7569,9 @@ const completeUrl = (url) => {
7569
7569
 
7570
7570
  "use strict";
7571
7571
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7572
- /* harmony export */ V: function() { return /* binding */ ConfigFlatten; },
7573
- /* harmony export */ t: function() { return /* binding */ ConfigProto; }
7572
+ /* harmony export */ VL: function() { return /* binding */ ConfigFlatten; },
7573
+ /* harmony export */ pi: function() { return /* binding */ ConfigDeepFlatten; },
7574
+ /* harmony export */ tb: function() { return /* binding */ ConfigProto; }
7574
7575
  /* harmony export */ });
7575
7576
  /* harmony import */ var jodit_core_helpers_checker_is_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(37923);
7576
7577
  /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25376);
@@ -7661,6 +7662,31 @@ function ConfigFlatten(obj) {
7661
7662
  return app;
7662
7663
  }, {});
7663
7664
  }
7665
+ /**
7666
+ * Returns a plain object from a prototype-based object.
7667
+ * ```typescript
7668
+ * const editor = Jodit.make('#editor', {
7669
+ * image: {
7670
+ * dialogWidth: 500
7671
+ * }
7672
+ * });
7673
+ *
7674
+ * console.log(editor.o.image.openOnDblClick) // true
7675
+ * // But you can't get all options in plain object
7676
+ * console.log(JSON.stringify(editor.o.image)); // {"dialogWidth":500}
7677
+ *
7678
+ * const plain = Jodit.modules.Helpers.ConfigDeepFlatten(editor.o.image);
7679
+ * console.log(JSON.stringify(plain)); // {"dialogWidth":500, "openOnDblClick": true, "editSrc": true, ...}
7680
+ * ```
7681
+ */
7682
+ function ConfigDeepFlatten(obj) {
7683
+ return (0,_utils__WEBPACK_IMPORTED_MODULE_1__/* .keys */ .HP)(obj, false).reduce((app, key) => {
7684
+ app[key] = (0,jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .Q)(obj[key])
7685
+ ? ConfigDeepFlatten(obj[key])
7686
+ : obj[key];
7687
+ return app;
7688
+ }, {});
7689
+ }
7664
7690
 
7665
7691
 
7666
7692
  /***/ }),
@@ -8292,8 +8318,9 @@ const humanSizeToBytes = (human) => {
8292
8318
  __webpack_require__.r(__webpack_exports__);
8293
8319
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8294
8320
  /* harmony export */ $$: function() { return /* reexport safe */ _selector__WEBPACK_IMPORTED_MODULE_23__.$$; },
8295
- /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.V; },
8296
- /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.t; },
8321
+ /* harmony export */ ConfigDeepFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.pi; },
8322
+ /* harmony export */ ConfigFlatten: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.VL; },
8323
+ /* harmony export */ ConfigProto: function() { return /* reexport safe */ _config_proto__WEBPACK_IMPORTED_MODULE_7__.tb; },
8297
8324
  /* harmony export */ ConnectionError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.Rc; },
8298
8325
  /* harmony export */ LimitedStack: function() { return /* reexport safe */ _stack__WEBPACK_IMPORTED_MODULE_25__.d; },
8299
8326
  /* harmony export */ OptionsError: function() { return /* reexport safe */ _error__WEBPACK_IMPORTED_MODULE_13__.ZW; },
@@ -12896,6 +12923,7 @@ class Dlgs {
12896
12923
  shadowRoot: this.o.shadowRoot,
12897
12924
  ownerWindow: this.o.ownerWindow,
12898
12925
  defaultTimeout: this.o.defaultTimeout,
12926
+ direction: this.o.direction,
12899
12927
  theme: this.o.theme,
12900
12928
  globalFullSize: this.o.globalFullSize,
12901
12929
  ...options
@@ -17416,13 +17444,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17416
17444
  })
17417
17445
  .on('blur', () => (this.editorIsActive = false));
17418
17446
  this.__prepareWYSIWYGEditor();
17419
- // direction
17420
- if (this.o.direction) {
17421
- const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
17422
- this.container.style.direction = direction;
17423
- this.container.setAttribute('dir', direction);
17424
- this.toolbar.setDirection(direction);
17425
- }
17426
17447
  if (this.o.triggerChangeEvent) {
17427
17448
  this.e.on('change', this.async.debounce(() => {
17428
17449
  this.e && this.e.fire(this.element, 'change');
@@ -17440,6 +17461,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17440
17461
  const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
17441
17462
  this.editor.style.direction = direction;
17442
17463
  this.editor.setAttribute('dir', direction);
17464
+ this.container.style.direction = direction;
17465
+ this.container.setAttribute('dir', direction);
17466
+ this.toolbar.setDirection(direction);
17443
17467
  }
17444
17468
  // proxy events
17445
17469
  this.e
@@ -18434,6 +18458,10 @@ let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__
18434
18458
  <div class="${n('resizer')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_9__/* .Icon */ .In.get('resize_handler')}</div>
18435
18459
  </div>
18436
18460
  </div>`);
18461
+ if (self.options.direction === 'rtl') {
18462
+ self.container.style.direction = 'rtl';
18463
+ self.container.setAttribute('dir', 'rtl');
18464
+ }
18437
18465
  if (this.o.zIndex) {
18438
18466
  this.container.style.zIndex = this.o.zIndex.toString();
18439
18467
  }
@@ -39891,6 +39919,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39891
39919
  this.container.appendChild(fakeMirror);
39892
39920
  const ace = editor.ow.ace;
39893
39921
  this.instance = ace.edit(fakeMirror);
39922
+ if (editor.o.direction === 'rtl') {
39923
+ this.instance.setOption('rtlText', true);
39924
+ this.instance.setOption('rtl', true);
39925
+ }
39894
39926
  this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
39895
39927
  this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
39896
39928
  this.instance
@@ -40054,7 +40086,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
40054
40086
  }
40055
40087
  init(editor) {
40056
40088
  this.instance = editor.c.element('textarea', {
40057
- class: 'jodit-source__mirror'
40089
+ class: 'jodit-source__mirror',
40090
+ dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
40058
40091
  });
40059
40092
  this.container.appendChild(this.instance);
40060
40093
  editor.e