jodit 4.5.16 → 4.5.17

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 (66) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +20 -6
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.css +1 -1
  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 +20 -6
  15. package/es2018/jodit.min.js +2 -2
  16. package/es2018/plugins/debug/debug.css +1 -1
  17. package/es2018/plugins/debug/debug.js +1 -1
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  22. package/es2021/jodit.css +1 -1
  23. package/es2021/jodit.fat.min.js +2 -2
  24. package/es2021/jodit.js +20 -6
  25. package/es2021/jodit.min.js +2 -2
  26. package/es2021/plugins/debug/debug.css +1 -1
  27. package/es2021/plugins/debug/debug.js +1 -1
  28. package/es2021/plugins/debug/debug.min.js +1 -1
  29. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  32. package/es2021.en/jodit.css +1 -1
  33. package/es2021.en/jodit.fat.min.js +2 -2
  34. package/es2021.en/jodit.js +20 -6
  35. package/es2021.en/jodit.min.js +2 -2
  36. package/es2021.en/plugins/debug/debug.css +1 -1
  37. package/es2021.en/plugins/debug/debug.js +1 -1
  38. package/es2021.en/plugins/debug/debug.min.js +1 -1
  39. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  42. package/es5/415.fat.min.js +1 -1
  43. package/es5/415.min.js +1 -1
  44. package/es5/5.fat.min.js +1 -1
  45. package/es5/5.min.js +1 -1
  46. package/es5/jodit.css +2 -2
  47. package/es5/jodit.fat.min.js +2 -2
  48. package/es5/jodit.js +20 -6
  49. package/es5/jodit.min.css +2 -2
  50. package/es5/jodit.min.js +2 -2
  51. package/es5/plugins/debug/debug.css +1 -1
  52. package/es5/plugins/debug/debug.js +1 -1
  53. package/es5/plugins/debug/debug.min.js +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  57. package/esm/config.d.ts +4 -0
  58. package/esm/core/constants.js +1 -1
  59. package/esm/plugins/link/config.d.ts +4 -0
  60. package/esm/plugins/link/config.js +1 -0
  61. package/esm/plugins/link/link.d.ts +2 -1
  62. package/esm/plugins/link/link.js +17 -4
  63. package/package.json +1 -1
  64. package/types/config.d.ts +4 -0
  65. package/types/plugins/link/config.d.ts +4 -0
  66. package/types/plugins/link/link.d.ts +2 -1
package/es2021/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.5.16
4
+ * Version: v4.5.17
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8328,7 +8328,7 @@ __webpack_require__.r(__webpack_exports__);
8328
8328
  * Released under MIT see LICENSE.txt in the project root for license information.
8329
8329
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
8330
8330
  */
8331
- const APP_VERSION = "4.5.16";
8331
+ const APP_VERSION = "4.5.17";
8332
8332
  // prettier-ignore
8333
8333
  const ES = "es2021";
8334
8334
  const IS_ES_MODERN = true;
@@ -21408,8 +21408,9 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
21408
21408
  /** @override */
21409
21409
  afterInit(jodit) {
21410
21410
  if (jodit.o.link.followOnDblClick) {
21411
- jodit.e.on('dblclick.link', this.onDblClickOnLink);
21411
+ jodit.e.on('dblclick.link', this.__onDblClickOnLink);
21412
21412
  }
21413
+ jodit.e.on(jodit.editor, 'click.link', this.__onClickReadOnlyLink);
21413
21414
  if (jodit.o.link.processPastedLink) {
21414
21415
  jodit.e.on('processPaste.link', this.onProcessPasteLink);
21415
21416
  }
@@ -21433,7 +21434,7 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
21433
21434
  hotkeys: jodit.o.link.hotkeys
21434
21435
  });
21435
21436
  }
21436
- onDblClickOnLink(e) {
21437
+ __onDblClickOnLink(e) {
21437
21438
  if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(e.target, 'a')) {
21438
21439
  return;
21439
21440
  }
@@ -21615,19 +21616,31 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
21615
21616
  beforeDestruct(jodit) {
21616
21617
  jodit.e
21617
21618
  .off('generateLinkForm.link', this.__generateForm)
21618
- .off('dblclick.link', this.onDblClickOnLink)
21619
+ .off('dblclick.link', this.__onDblClickOnLink)
21620
+ .off(jodit.editor, 'click.link', this.__onClickReadOnlyLink)
21619
21621
  .off('processPaste.link', this.onProcessPasteLink);
21620
21622
  }
21623
+ __onClickReadOnlyLink(e) {
21624
+ const { jodit } = this;
21625
+ if (jodit.o.readonly &&
21626
+ jodit.o.link.preventReadOnlyNavigation &&
21627
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(e.target, 'a')) {
21628
+ e.preventDefault();
21629
+ }
21630
+ }
21621
21631
  }
21622
21632
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
21623
21633
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
21624
- ], link.prototype, "onDblClickOnLink", null);
21634
+ ], link.prototype, "__onDblClickOnLink", null);
21625
21635
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
21626
21636
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
21627
21637
  ], link.prototype, "onProcessPasteLink", null);
21628
21638
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
21629
21639
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
21630
21640
  ], link.prototype, "__generateForm", null);
21641
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
21642
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
21643
+ ], link.prototype, "__onClickReadOnlyLink", null);
21631
21644
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
21632
21645
  function writeClasses(modeClassName, className_input, className_select, a) {
21633
21646
  if (modeClassName && (className_input ?? className_select)) {
@@ -29505,6 +29518,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.link = {
29505
29518
  openInNewTabCheckbox: true,
29506
29519
  modeClassName: 'input',
29507
29520
  selectMultipleClassName: true,
29521
+ preventReadOnlyNavigation: true,
29508
29522
  selectSizeClassName: 3,
29509
29523
  selectOptionsClassName: [],
29510
29524
  hotkeys: ['ctrl+k', 'cmd+k']