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
  */
@@ -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
  */
@@ -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
  */
@@ -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
  */
@@ -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
  */
@@ -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
  */
package/esm/config.d.ts CHANGED
@@ -1117,6 +1117,10 @@ interface Config {
1117
1117
  */
1118
1118
  selectOptionsClassName: IUIOption[];
1119
1119
  hotkeys: string[];
1120
+ /**
1121
+ * Prevent navigation to the link if it is readonly. Default: true
1122
+ */
1123
+ preventReadOnlyNavigation: boolean;
1120
1124
  };
1121
1125
  }
1122
1126
  interface Config {
@@ -3,7 +3,7 @@
3
3
  * Released under MIT see LICENSE.txt in the project root for license information.
4
4
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.5.16";
6
+ export const APP_VERSION = "4.5.17";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -52,6 +52,10 @@ declare module 'jodit/config' {
52
52
  */
53
53
  selectOptionsClassName: IUIOption[];
54
54
  hotkeys: string[];
55
+ /**
56
+ * Prevent navigation to the link if it is readonly. Default: true
57
+ */
58
+ preventReadOnlyNavigation: boolean;
55
59
  };
56
60
  }
57
61
  }
@@ -18,6 +18,7 @@ Config.prototype.link = {
18
18
  openInNewTabCheckbox: true,
19
19
  modeClassName: 'input',
20
20
  selectMultipleClassName: true,
21
+ preventReadOnlyNavigation: true,
21
22
  selectSizeClassName: 3,
22
23
  selectOptionsClassName: [],
23
24
  hotkeys: ['ctrl+k', 'cmd+k']
@@ -19,9 +19,10 @@ export declare class link extends Plugin {
19
19
  buttons: Plugin['buttons'];
20
20
  /** @override */
21
21
  protected afterInit(jodit: IJodit): void;
22
- private onDblClickOnLink;
22
+ private __onDblClickOnLink;
23
23
  private onProcessPasteLink;
24
24
  private __generateForm;
25
25
  /** @override */
26
26
  protected beforeDestruct(jodit: IJodit): void;
27
+ private __onClickReadOnlyLink;
27
28
  }
@@ -36,8 +36,9 @@ export class link extends Plugin {
36
36
  /** @override */
37
37
  afterInit(jodit) {
38
38
  if (jodit.o.link.followOnDblClick) {
39
- jodit.e.on('dblclick.link', this.onDblClickOnLink);
39
+ jodit.e.on('dblclick.link', this.__onDblClickOnLink);
40
40
  }
41
+ jodit.e.on(jodit.editor, 'click.link', this.__onClickReadOnlyLink);
41
42
  if (jodit.o.link.processPastedLink) {
42
43
  jodit.e.on('processPaste.link', this.onProcessPasteLink);
43
44
  }
@@ -61,7 +62,7 @@ export class link extends Plugin {
61
62
  hotkeys: jodit.o.link.hotkeys
62
63
  });
63
64
  }
64
- onDblClickOnLink(e) {
65
+ __onDblClickOnLink(e) {
65
66
  if (!Dom.isTag(e.target, 'a')) {
66
67
  return;
67
68
  }
@@ -243,19 +244,31 @@ export class link extends Plugin {
243
244
  beforeDestruct(jodit) {
244
245
  jodit.e
245
246
  .off('generateLinkForm.link', this.__generateForm)
246
- .off('dblclick.link', this.onDblClickOnLink)
247
+ .off('dblclick.link', this.__onDblClickOnLink)
248
+ .off(jodit.editor, 'click.link', this.__onClickReadOnlyLink)
247
249
  .off('processPaste.link', this.onProcessPasteLink);
248
250
  }
251
+ __onClickReadOnlyLink(e) {
252
+ const { jodit } = this;
253
+ if (jodit.o.readonly &&
254
+ jodit.o.link.preventReadOnlyNavigation &&
255
+ Dom.isTag(e.target, 'a')) {
256
+ e.preventDefault();
257
+ }
258
+ }
249
259
  }
250
260
  __decorate([
251
261
  autobind
252
- ], link.prototype, "onDblClickOnLink", null);
262
+ ], link.prototype, "__onDblClickOnLink", null);
253
263
  __decorate([
254
264
  autobind
255
265
  ], link.prototype, "onProcessPasteLink", null);
256
266
  __decorate([
257
267
  autobind
258
268
  ], link.prototype, "__generateForm", null);
269
+ __decorate([
270
+ autobind
271
+ ], link.prototype, "__onClickReadOnlyLink", null);
259
272
  pluginSystem.add('link', link);
260
273
  function writeClasses(modeClassName, className_input, className_select, a) {
261
274
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.5.16",
3
+ "version": "4.5.17",
4
4
  "description": "Jodit is an awesome and useful wysiwyg editor with filebrowser",
5
5
  "main": "esm/index.js",
6
6
  "types": "types/index.d.ts",
package/types/config.d.ts CHANGED
@@ -1117,6 +1117,10 @@ interface Config {
1117
1117
  */
1118
1118
  selectOptionsClassName: IUIOption[];
1119
1119
  hotkeys: string[];
1120
+ /**
1121
+ * Prevent navigation to the link if it is readonly. Default: true
1122
+ */
1123
+ preventReadOnlyNavigation: boolean;
1120
1124
  };
1121
1125
  }
1122
1126
  interface Config {
@@ -52,6 +52,10 @@ declare module 'jodit/config' {
52
52
  */
53
53
  selectOptionsClassName: IUIOption[];
54
54
  hotkeys: string[];
55
+ /**
56
+ * Prevent navigation to the link if it is readonly. Default: true
57
+ */
58
+ preventReadOnlyNavigation: boolean;
55
59
  };
56
60
  }
57
61
  }
@@ -19,9 +19,10 @@ export declare class link extends Plugin {
19
19
  buttons: Plugin['buttons'];
20
20
  /** @override */
21
21
  protected afterInit(jodit: IJodit): void;
22
- private onDblClickOnLink;
22
+ private __onDblClickOnLink;
23
23
  private onProcessPasteLink;
24
24
  private __generateForm;
25
25
  /** @override */
26
26
  protected beforeDestruct(jodit: IJodit): void;
27
+ private __onClickReadOnlyLink;
27
28
  }