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
@@ -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
  */
@@ -7942,7 +7942,7 @@ __webpack_require__.r(__webpack_exports__);
7942
7942
  * Released under MIT see LICENSE.txt in the project root for license information.
7943
7943
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7944
7944
  */
7945
- const APP_VERSION = "4.5.16";
7945
+ const APP_VERSION = "4.5.17";
7946
7946
  // prettier-ignore
7947
7947
  const ES = "es2021";
7948
7948
  const IS_ES_MODERN = true;
@@ -20565,8 +20565,9 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
20565
20565
  /** @override */
20566
20566
  afterInit(jodit) {
20567
20567
  if (jodit.o.link.followOnDblClick) {
20568
- jodit.e.on('dblclick.link', this.onDblClickOnLink);
20568
+ jodit.e.on('dblclick.link', this.__onDblClickOnLink);
20569
20569
  }
20570
+ jodit.e.on(jodit.editor, 'click.link', this.__onClickReadOnlyLink);
20570
20571
  if (jodit.o.link.processPastedLink) {
20571
20572
  jodit.e.on('processPaste.link', this.onProcessPasteLink);
20572
20573
  }
@@ -20590,7 +20591,7 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
20590
20591
  hotkeys: jodit.o.link.hotkeys
20591
20592
  });
20592
20593
  }
20593
- onDblClickOnLink(e) {
20594
+ __onDblClickOnLink(e) {
20594
20595
  if (!jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(e.target, 'a')) {
20595
20596
  return;
20596
20597
  }
@@ -20772,19 +20773,31 @@ class link extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_4__/* .Plugin */ .
20772
20773
  beforeDestruct(jodit) {
20773
20774
  jodit.e
20774
20775
  .off('generateLinkForm.link', this.__generateForm)
20775
- .off('dblclick.link', this.onDblClickOnLink)
20776
+ .off('dblclick.link', this.__onDblClickOnLink)
20777
+ .off(jodit.editor, 'click.link', this.__onClickReadOnlyLink)
20776
20778
  .off('processPaste.link', this.onProcessPasteLink);
20777
20779
  }
20780
+ __onClickReadOnlyLink(e) {
20781
+ const { jodit } = this;
20782
+ if (jodit.o.readonly &&
20783
+ jodit.o.link.preventReadOnlyNavigation &&
20784
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(e.target, 'a')) {
20785
+ e.preventDefault();
20786
+ }
20787
+ }
20778
20788
  }
20779
20789
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
20780
20790
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
20781
- ], link.prototype, "onDblClickOnLink", null);
20791
+ ], link.prototype, "__onDblClickOnLink", null);
20782
20792
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
20783
20793
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
20784
20794
  ], link.prototype, "onProcessPasteLink", null);
20785
20795
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
20786
20796
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
20787
20797
  ], link.prototype, "__generateForm", null);
20798
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
20799
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
20800
+ ], link.prototype, "__onClickReadOnlyLink", null);
20788
20801
  jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
20789
20802
  function writeClasses(modeClassName, className_input, className_select, a) {
20790
20803
  if (modeClassName && (className_input ?? className_select)) {
@@ -28389,6 +28402,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.link = {
28389
28402
  openInNewTabCheckbox: true,
28390
28403
  modeClassName: 'input',
28391
28404
  selectMultipleClassName: true,
28405
+ preventReadOnlyNavigation: true,
28392
28406
  selectSizeClassName: 3,
28393
28407
  selectOptionsClassName: [],
28394
28408
  hotkeys: ['ctrl+k', 'cmd+k']