jodit 4.2.41 → 4.2.45

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 (119) hide show
  1. package/CHANGELOG.md +65 -5
  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 +121 -45
  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 +121 -45
  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 +121 -45
  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 +121 -45
  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 +121 -45
  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/complete-url.d.ts +0 -3
  68. package/esm/core/helpers/utils/complete-url.js +1 -1
  69. package/esm/core/helpers/utils/config-proto.d.ts +18 -0
  70. package/esm/core/helpers/utils/config-proto.js +25 -0
  71. package/esm/core/selection/style/api/extract.js +1 -0
  72. package/esm/jodit.d.ts +11 -1
  73. package/esm/jodit.js +14 -8
  74. package/esm/modules/history/snapshot.d.ts +1 -0
  75. package/esm/modules/history/snapshot.js +8 -1
  76. package/esm/modules/toolbar/button/button.js +18 -9
  77. package/esm/plugins/ai-assistant/langs/index.d.ts +3 -0
  78. package/esm/plugins/ai-assistant/langs/index.js +3 -0
  79. package/esm/plugins/image-properties/readers/align.d.ts +3 -1
  80. package/esm/plugins/image-properties/readers/align.js +3 -1
  81. package/esm/plugins/image-properties/readers/index.d.ts +3 -0
  82. package/esm/plugins/image-properties/readers/link.d.ts +3 -0
  83. package/esm/plugins/image-properties/readers/margin.js +3 -0
  84. package/esm/plugins/image-properties/readers/size.js +3 -0
  85. package/esm/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
  86. package/esm/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
  87. package/esm/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
  88. package/esm/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
  89. package/esm/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
  90. package/esm/plugins/image-properties/utils/utils.js +3 -0
  91. package/esm/plugins/image-properties/writers/index.d.ts +3 -0
  92. package/esm/plugins/image-properties/writers/link.d.ts +3 -0
  93. package/esm/plugins/image-properties/writers/margin.d.ts +3 -0
  94. package/esm/plugins/image-properties/writers/size.js +3 -0
  95. package/esm/plugins/source/editor/engines/ace.js +4 -0
  96. package/esm/plugins/source/editor/engines/area.js +2 -1
  97. package/esm/plugins/symbols/config.js +6 -7
  98. package/esm/plugins/symbols/symbols.d.ts +1 -3
  99. package/esm/plugins/symbols/symbols.js +16 -11
  100. package/esm/types/history.d.ts +3 -0
  101. package/package.json +1 -1
  102. package/types/core/helpers/utils/complete-url.d.ts +0 -3
  103. package/types/core/helpers/utils/config-proto.d.ts +18 -0
  104. package/types/jodit.d.ts +11 -1
  105. package/types/modules/history/snapshot.d.ts +1 -0
  106. package/types/plugins/ai-assistant/langs/index.d.ts +3 -0
  107. package/types/plugins/image-properties/readers/align.d.ts +3 -1
  108. package/types/plugins/image-properties/readers/index.d.ts +3 -0
  109. package/types/plugins/image-properties/readers/link.d.ts +3 -0
  110. package/types/plugins/image-properties/ui/ui-image-form.d.ts +3 -0
  111. package/types/plugins/image-properties/ui/ui-image-main-tab.d.ts +3 -0
  112. package/types/plugins/image-properties/ui/ui-image-position-tab.d.ts +3 -0
  113. package/types/plugins/image-properties/utils/open-image-editor.d.ts +3 -0
  114. package/types/plugins/image-properties/utils/open-image-popup.d.ts +3 -0
  115. package/types/plugins/image-properties/writers/index.d.ts +3 -0
  116. package/types/plugins/image-properties/writers/link.d.ts +3 -0
  117. package/types/plugins/image-properties/writers/margin.d.ts +3 -0
  118. package/types/plugins/symbols/symbols.d.ts +1 -3
  119. package/types/types/history.d.ts +3 -0
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.41
4
+ * Version: v4.2.45
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.41";
1738
+ const APP_VERSION = "4.2.45";
1739
1739
  // prettier-ignore
1740
1740
  const ES = "es2018";
1741
1741
  const IS_ES_MODERN = true;
@@ -7550,10 +7550,10 @@ const buildQuery = (data, prefix) => {
7550
7550
  * Released under MIT see LICENSE.txt in the project root for license information.
7551
7551
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7552
7552
  */
7553
-
7554
7553
  /**
7555
7554
  * @module helpers/utils
7556
7555
  */
7556
+
7557
7557
  const completeUrl = (url) => {
7558
7558
  if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
7559
7559
  url = 'https:' + url;
@@ -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; },
@@ -11284,6 +11311,7 @@ function extractSelectedPart(wrapper, font, jodit) {
11284
11311
  }
11285
11312
  /**
11286
11313
  * Retrieves content before after the selected area, clears it if it is empty, and inserts before after the framed selection
11314
+ * @private
11287
11315
  */
11288
11316
  function extractAndMove(wrapper, range, left) {
11289
11317
  const fragment = range.extractContents();
@@ -16400,7 +16428,17 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
16400
16428
  : jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.defaultOptions.defaultTimeout;
16401
16429
  }
16402
16430
  /**
16403
- * Method wrap usual Has Object in Object helper for prevent deep object merging in options*
16431
+ * Method wrap usual object in Object helper for prevent deep object merging in options*
16432
+ * ```js
16433
+ * const editor = Jodit.make('#editor', {
16434
+ * controls: {
16435
+ * fontsize: {
16436
+ * list: Jodit.atom([8, 9, 10])
16437
+ * }
16438
+ * }
16439
+ * });
16440
+ * ```
16441
+ * In this case, the array [8, 9, 10] will not be combined with other arrays, but will replace them
16404
16442
  */
16405
16443
  static atom(object) {
16406
16444
  return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.markAsAtomic)(object);
@@ -17405,13 +17443,6 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17405
17443
  })
17406
17444
  .on('blur', () => (this.editorIsActive = false));
17407
17445
  this.__prepareWYSIWYGEditor();
17408
- // direction
17409
- if (this.o.direction) {
17410
- const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
17411
- this.container.style.direction = direction;
17412
- this.container.setAttribute('dir', direction);
17413
- this.toolbar.setDirection(direction);
17414
- }
17415
17446
  if (this.o.triggerChangeEvent) {
17416
17447
  this.e.on('change', this.async.debounce(() => {
17417
17448
  this.e && this.e.fire(this.element, 'change');
@@ -17429,6 +17460,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17429
17460
  const direction = this.o.direction.toLowerCase() === 'rtl' ? 'rtl' : 'ltr';
17430
17461
  this.editor.style.direction = direction;
17431
17462
  this.editor.setAttribute('dir', direction);
17463
+ this.container.style.direction = direction;
17464
+ this.container.setAttribute('dir', direction);
17465
+ this.toolbar.setDirection(direction);
17432
17466
  }
17433
17467
  // proxy events
17434
17468
  this.e
@@ -20965,6 +20999,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
20965
20999
  constructor() {
20966
21000
  super(...arguments);
20967
21001
  this.__isBlocked = false;
21002
+ this.__levelOfTransaction = 0;
20968
21003
  }
20969
21004
  /** @override */
20970
21005
  className() {
@@ -21045,6 +21080,7 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
21045
21080
  }
21046
21081
  transaction(changes) {
21047
21082
  this.__block(true);
21083
+ this.__levelOfTransaction += 1;
21048
21084
  try {
21049
21085
  changes();
21050
21086
  }
@@ -21053,7 +21089,12 @@ class Snapshot extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .View
21053
21089
  throw e;
21054
21090
  }
21055
21091
  }
21056
- this.__block(false);
21092
+ finally {
21093
+ this.__levelOfTransaction -= 1;
21094
+ if (this.__levelOfTransaction === 0) {
21095
+ this.__block(false);
21096
+ }
21097
+ }
21057
21098
  }
21058
21099
  /**
21059
21100
  * Creates object a snapshot of editor: html and the current selection. Current selection calculate by
@@ -23300,17 +23341,26 @@ let ToolbarButton = class ToolbarButton extends jodit_core_ui_button__WEBPACK_IM
23300
23341
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.popup)) {
23301
23342
  const popup = this.openPopup();
23302
23343
  popup.parentElement = this;
23303
- if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
23304
- const target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
23305
- const elm = ctr.popup(this.j, target, this.__closePopup, this);
23306
- if (elm) {
23307
- popup
23308
- .setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
23309
- .open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
23310
- ? this.container
23311
- : undefined);
23344
+ try {
23345
+ if (this.j.e.fire((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
23346
+ const target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
23347
+ const elm = ctr.popup(this.j, target, this.__closePopup, this);
23348
+ if (elm) {
23349
+ popup
23350
+ .setContent((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm)
23351
+ .open(() => (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation
23352
+ ? this.container
23353
+ : undefined);
23354
+ }
23355
+ else {
23356
+ this.__closePopup();
23357
+ }
23312
23358
  }
23313
23359
  }
23360
+ catch (e) {
23361
+ this.__closePopup();
23362
+ throw e;
23363
+ }
23314
23364
  /**
23315
23365
  * Fired after the popup was opened for some control button
23316
23366
  */
@@ -25709,6 +25759,9 @@ __webpack_require__.r(__webpack_exports__);
25709
25759
  * Released under MIT see LICENSE.txt in the project root for license information.
25710
25760
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
25711
25761
  */
25762
+ /**
25763
+ * @module plugins/ai-assistant
25764
+ */
25712
25765
 
25713
25766
 
25714
25767
 
@@ -31701,7 +31754,9 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('image
31701
31754
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
31702
31755
  */
31703
31756
 
31704
- /** @private */
31757
+ /**
31758
+ * @private
31759
+ */
31705
31760
  function readAlign(image, values) {
31706
31761
  // Align
31707
31762
  if (image.style.cssFloat &&
@@ -31822,6 +31877,9 @@ function readLink(state, j, values) {
31822
31877
  * Released under MIT see LICENSE.txt in the project root for license information.
31823
31878
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
31824
31879
  */
31880
+ /**
31881
+ * @module plugins/image-properties
31882
+ */
31825
31883
 
31826
31884
  /** @private */
31827
31885
  function readMargins(image, values, state) {
@@ -31865,6 +31923,9 @@ function readMargins(image, values, state) {
31865
31923
  * Released under MIT see LICENSE.txt in the project root for license information.
31866
31924
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
31867
31925
  */
31926
+ /**
31927
+ * @module plugins/image-properties
31928
+ */
31868
31929
 
31869
31930
 
31870
31931
 
@@ -32678,6 +32739,9 @@ function openImagePopup(j, dialog, state, button) {
32678
32739
  * Released under MIT see LICENSE.txt in the project root for license information.
32679
32740
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
32680
32741
  */
32742
+ /**
32743
+ * @module plugins/image-properties
32744
+ */
32681
32745
 
32682
32746
 
32683
32747
  /** @private */
@@ -32866,6 +32930,9 @@ function applyMargin(j, marginTop, marginRight, marginBottom, marginLeft, image,
32866
32930
  * Released under MIT see LICENSE.txt in the project root for license information.
32867
32931
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
32868
32932
  */
32933
+ /**
32934
+ * @module plugins/image-properties
32935
+ */
32869
32936
 
32870
32937
 
32871
32938
 
@@ -39847,6 +39914,10 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
39847
39914
  this.container.appendChild(fakeMirror);
39848
39915
  const ace = editor.ow.ace;
39849
39916
  this.instance = ace.edit(fakeMirror);
39917
+ if (editor.o.direction === 'rtl') {
39918
+ this.instance.setOption('rtlText', true);
39919
+ this.instance.setOption('rtl', true);
39920
+ }
39850
39921
  this.instance.setTheme(editor.o.sourceEditorNativeOptions.theme);
39851
39922
  this.instance.renderer.setShowGutter(editor.o.sourceEditorNativeOptions.showGutter);
39852
39923
  this.instance
@@ -40010,7 +40081,8 @@ class TextAreaEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_I
40010
40081
  }
40011
40082
  init(editor) {
40012
40083
  this.instance = editor.c.element('textarea', {
40013
- class: 'jodit-source__mirror'
40084
+ class: 'jodit-source__mirror',
40085
+ dir: editor.o.direction === 'rtl' ? 'rtl' : undefined
40014
40086
  });
40015
40087
  this.container.appendChild(this.instance);
40016
40088
  editor.e
@@ -41617,14 +41689,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.sym
41617
41689
  editor.e.on(container, 'close_dialog', close);
41618
41690
  return box;
41619
41691
  }
41620
- else {
41621
- editor
41622
- .alert(container, 'Select Special Character', undefined, 'jodit-symbols')
41623
- .bindDestruct(editor);
41624
- const a = container.querySelector('a');
41625
- a && a.focus();
41626
- }
41692
+ editor
41693
+ .alert(container, 'Select Special Character', undefined, 'jodit-symbols')
41694
+ .bindDestruct(editor);
41695
+ const a = container.querySelector('a');
41696
+ a && a.focus();
41627
41697
  }
41698
+ return;
41628
41699
  }
41629
41700
  };
41630
41701
 
@@ -42141,17 +42212,15 @@ module.exports = {
42141
42212
  class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .k {
42142
42213
  constructor(jodit) {
42143
42214
  super(jodit);
42144
- /** @override */
42145
42215
  this.buttons = [
42146
42216
  {
42147
42217
  name: 'symbols',
42148
42218
  group: 'insert'
42149
42219
  }
42150
42220
  ];
42151
- this.countInRow = 17;
42221
+ this.__countInRow = 17;
42152
42222
  (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
42153
42223
  }
42154
- /** @override */
42155
42224
  afterInit(jodit) {
42156
42225
  jodit.e.on('generateSpecialCharactersTable.symbols', () => {
42157
42226
  const container = jodit.c.fromHTML(`<div class="jodit-symbols__container">
@@ -42161,10 +42230,15 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
42161
42230
  <div class="jodit-symbols__container_preview">
42162
42231
  <div class="jodit-symbols__preview"></div>
42163
42232
  </div>
42164
- </div>`), preview = container.querySelector('.jodit-symbols__preview'), table = container.querySelector('table'), body = table.tBodies[0], chars = [];
42233
+ </div>`);
42234
+ const preview = container.querySelector('.jodit-symbols__preview');
42235
+ const table = container.querySelector('table');
42236
+ const body = table.tBodies[0];
42237
+ const chars = [];
42165
42238
  for (let i = 0; i < jodit.o.specialCharacters.length;) {
42166
42239
  const tr = jodit.c.element('tr');
42167
- for (let j = 0; j < this.countInRow && i < jodit.o.specialCharacters.length; j += 1, i += 1) {
42240
+ for (let j = 0; j < this.__countInRow &&
42241
+ i < jodit.o.specialCharacters.length; j += 1, i += 1) {
42168
42242
  const td = jodit.c.element('td'), a = jodit.c.fromHTML(`<a
42169
42243
  data-index="${i}"
42170
42244
  data-index-j="${j}"
@@ -42186,7 +42260,9 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
42186
42260
  if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
42187
42261
  jodit.s.focus();
42188
42262
  jodit.s.insertHTML(this.innerHTML);
42189
- jodit.e.fire(this, 'close_dialog');
42263
+ if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
42264
+ jodit.e.fire(this, 'close_dialog');
42265
+ }
42190
42266
  e && e.preventDefault();
42191
42267
  e && e.stopImmediatePropagation();
42192
42268
  }
@@ -42206,18 +42282,18 @@ class symbols extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_4__/* .P
42206
42282
  case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_DOWN:
42207
42283
  newIndex =
42208
42284
  e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
42209
- ? index - self.countInRow
42210
- : index + self.countInRow;
42285
+ ? index - self.__countInRow
42286
+ : index + self.__countInRow;
42211
42287
  if (chars[newIndex] === undefined) {
42212
42288
  newIndex =
42213
42289
  e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_UP
42214
42290
  ? Math.floor(chars.length /
42215
- self.countInRow) *
42216
- self.countInRow +
42291
+ self.__countInRow) *
42292
+ self.__countInRow +
42217
42293
  jIndex
42218
42294
  : jIndex;
42219
42295
  if (newIndex > chars.length - 1) {
42220
- newIndex -= self.countInRow;
42296
+ newIndex -= self.__countInRow;
42221
42297
  }
42222
42298
  }
42223
42299
  chars[newIndex] && chars[newIndex].focus();