jodit 4.5.4 → 4.5.8

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 (65) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +20 -12
  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 +16 -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 +16 -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 +16 -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/5.fat.min.js +1 -1
  43. package/es5/5.min.js +1 -1
  44. package/es5/975.fat.min.js +1 -1
  45. package/es5/975.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 +26 -21
  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/core/constants.js +1 -1
  58. package/esm/core/helpers/utils/append-script.d.ts +1 -4
  59. package/esm/core/helpers/utils/append-script.js +2 -2
  60. package/esm/jodit.d.ts +3 -0
  61. package/esm/jodit.js +4 -1
  62. package/esm/plugins/paste/paste.js +6 -1
  63. package/package.json +1 -1
  64. package/types/core/helpers/utils/append-script.d.ts +1 -4
  65. package/types/jodit.d.ts +3 -0
@@ -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.4
4
+ * Version: v4.5.8
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.4
4
+ * Version: v4.5.8
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.4
4
+ * Version: v4.5.8
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.4
4
+ * Version: v4.5.8
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.4
4
+ * Version: v4.5.8
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.4
4
+ * Version: v4.5.8
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -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.4";
6
+ export const APP_VERSION = "4.5.8";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -8,10 +8,7 @@
8
8
  */
9
9
  import type { IViewBased } from "../../../types/index";
10
10
  export type Loader = (jodit: IViewBased, url: string) => Promise<any>;
11
- export interface CallbackAndElement {
12
- callback: EventListener;
13
- element: HTMLElement;
14
- }
11
+ export declare const alreadyLoadedList: Map<string, Promise<any>>;
15
12
  /**
16
13
  * Load script and return promise
17
14
  */
@@ -5,9 +5,9 @@
5
5
  */
6
6
  import { isString } from "../checker/is-string.js";
7
7
  import { completeUrl } from "./complete-url.js";
8
- const alreadyLoadedList = new Map();
8
+ export const alreadyLoadedList = new Map();
9
9
  const cacheLoaders = (loader) => {
10
- return async (jodit, url) => {
10
+ return (jodit, url) => {
11
11
  if (alreadyLoadedList.has(url)) {
12
12
  return alreadyLoadedList.get(url);
13
13
  }
package/esm/jodit.d.ts CHANGED
@@ -34,6 +34,9 @@ export declare class Jodit extends ViewWithToolbar implements IJodit, Dlgs {
34
34
  * ```
35
35
  */
36
36
  waitForReady(): Promise<IJodit>;
37
+ /**
38
+ * @deprecated I don't know why I wrote itp
39
+ */
37
40
  static get ready(): Promise<IJodit>;
38
41
  /**
39
42
  * Define if object is Jodit
package/esm/jodit.js CHANGED
@@ -49,9 +49,12 @@ let Jodit = Jodit_1 = class Jodit extends ViewWithToolbar {
49
49
  this.hookStatus('ready', () => resolve(this));
50
50
  });
51
51
  }
52
+ /**
53
+ * @deprecated I don't know why I wrote itp
54
+ */
52
55
  static get ready() {
53
56
  return new Promise(resolve => {
54
- eventEmitter.on('oditready', resolve);
57
+ eventEmitter.on('joditready', resolve);
55
58
  });
56
59
  }
57
60
  /**
@@ -153,7 +153,12 @@ export class paste extends Plugin {
153
153
  case INSERT_AS_TEXT:
154
154
  html = htmlspecialchars(html);
155
155
  break;
156
- default:
156
+ default: {
157
+ const newHTML = this.j.e.fire('onCustomPasteHTMLOption', action, html, e);
158
+ if (typeof newHTML === 'string') {
159
+ html = newHTML;
160
+ }
161
+ }
157
162
  }
158
163
  }
159
164
  pasteInsertHtml(e, this.j, html);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.5.4",
3
+ "version": "4.5.8",
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",
@@ -8,10 +8,7 @@
8
8
  */
9
9
  import type { IViewBased } from "../../../types/index";
10
10
  export type Loader = (jodit: IViewBased, url: string) => Promise<any>;
11
- export interface CallbackAndElement {
12
- callback: EventListener;
13
- element: HTMLElement;
14
- }
11
+ export declare const alreadyLoadedList: Map<string, Promise<any>>;
15
12
  /**
16
13
  * Load script and return promise
17
14
  */
package/types/jodit.d.ts CHANGED
@@ -34,6 +34,9 @@ export declare class Jodit extends ViewWithToolbar implements IJodit, Dlgs {
34
34
  * ```
35
35
  */
36
36
  waitForReady(): Promise<IJodit>;
37
+ /**
38
+ * @deprecated I don't know why I wrote itp
39
+ */
37
40
  static get ready(): Promise<IJodit>;
38
41
  /**
39
42
  * Define if object is Jodit