jodit 4.6.1 → 4.6.4

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 (130) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +2 -2
  5. package/es2015/jodit.js +2930 -2896
  6. package/es2015/jodit.min.js +2 -2
  7. package/es2015/plugins/debug/debug.css +1 -1
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +56 -56
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  13. package/es2018/jodit.css +1 -1
  14. package/es2018/jodit.fat.min.js +2 -2
  15. package/es2018/jodit.js +2837 -2803
  16. package/es2018/jodit.min.js +2 -2
  17. package/es2018/plugins/debug/debug.css +1 -1
  18. package/es2018/plugins/debug/debug.js +1 -1
  19. package/es2018/plugins/debug/debug.min.js +1 -1
  20. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  21. package/es2018/plugins/speech-recognize/speech-recognize.js +56 -56
  22. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  23. package/es2021/jodit.css +1 -1
  24. package/es2021/jodit.fat.min.js +2 -2
  25. package/es2021/jodit.js +2838 -2804
  26. package/es2021/jodit.min.js +2 -2
  27. package/es2021/plugins/debug/debug.css +1 -1
  28. package/es2021/plugins/debug/debug.js +1 -1
  29. package/es2021/plugins/debug/debug.min.js +1 -1
  30. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  31. package/es2021/plugins/speech-recognize/speech-recognize.js +56 -56
  32. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  33. package/es2021.en/jodit.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +2 -2
  35. package/es2021.en/jodit.js +2796 -2762
  36. package/es2021.en/jodit.min.js +2 -2
  37. package/es2021.en/plugins/debug/debug.css +1 -1
  38. package/es2021.en/plugins/debug/debug.js +1 -1
  39. package/es2021.en/plugins/debug/debug.min.js +1 -1
  40. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.js +56 -56
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  43. package/es5/415.fat.min.js +2 -2
  44. package/es5/415.js +69 -5
  45. package/es5/415.min.js +2 -2
  46. package/es5/5.fat.min.js +1 -1
  47. package/es5/5.min.js +1 -1
  48. package/es5/jodit.css +2 -2
  49. package/es5/jodit.fat.min.js +2 -2
  50. package/es5/jodit.js +3796 -3758
  51. package/es5/jodit.min.css +2 -2
  52. package/es5/jodit.min.js +2 -2
  53. package/es5/plugins/debug/debug.css +1 -1
  54. package/es5/plugins/debug/debug.js +12 -12
  55. package/es5/plugins/debug/debug.min.js +1 -1
  56. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  57. package/es5/plugins/speech-recognize/speech-recognize.js +59 -59
  58. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  59. package/esm/core/constants.d.ts +7 -0
  60. package/esm/core/constants.js +31 -11
  61. package/esm/core/helpers/utils/append-script.js +1 -1
  62. package/esm/core/plugin/helpers/load.js +2 -0
  63. package/esm/core/view/view.d.ts +4 -0
  64. package/esm/core/view/view.js +10 -1
  65. package/esm/langs/ar.d.ts +1 -0
  66. package/esm/langs/ar.js +4 -1
  67. package/esm/langs/cs_cz.js +2 -0
  68. package/esm/langs/de.d.ts +1 -0
  69. package/esm/langs/de.js +4 -1
  70. package/esm/langs/en.js +2 -0
  71. package/esm/langs/es.d.ts +1 -0
  72. package/esm/langs/es.js +4 -1
  73. package/esm/langs/fa.js +3 -1
  74. package/esm/langs/fi.d.ts +1 -0
  75. package/esm/langs/fi.js +3 -1
  76. package/esm/langs/fr.d.ts +4 -0
  77. package/esm/langs/fr.js +6 -1
  78. package/esm/langs/he.d.ts +1 -0
  79. package/esm/langs/he.js +3 -1
  80. package/esm/langs/hu.d.ts +1 -0
  81. package/esm/langs/hu.js +3 -1
  82. package/esm/langs/id.js +1 -0
  83. package/esm/langs/it.d.ts +1 -0
  84. package/esm/langs/it.js +3 -1
  85. package/esm/langs/ja.d.ts +1 -0
  86. package/esm/langs/ja.js +3 -1
  87. package/esm/langs/ko.js +1 -0
  88. package/esm/langs/mn.d.ts +1 -0
  89. package/esm/langs/mn.js +3 -1
  90. package/esm/langs/nl.d.ts +1 -0
  91. package/esm/langs/nl.js +3 -1
  92. package/esm/langs/no.d.ts +22 -0
  93. package/esm/langs/no.js +27 -1
  94. package/esm/langs/pl.d.ts +1 -0
  95. package/esm/langs/pl.js +3 -1
  96. package/esm/langs/pt_br.d.ts +1 -0
  97. package/esm/langs/pt_br.js +3 -1
  98. package/esm/langs/ru.js +1 -0
  99. package/esm/langs/sv.js +231 -0
  100. package/esm/langs/tr.d.ts +1 -0
  101. package/esm/langs/tr.js +3 -1
  102. package/esm/langs/ua.js +1 -0
  103. package/esm/langs/zh_cn.d.ts +1 -0
  104. package/esm/langs/zh_cn.js +3 -1
  105. package/esm/langs/zh_tw.d.ts +2 -0
  106. package/esm/langs/zh_tw.js +4 -1
  107. package/esm/modules/uploader/helpers/data-uri-to-blob.js +1 -1
  108. package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +2 -2
  109. package/esm/types/view.d.ts +6 -1
  110. package/package.json +1 -1
  111. package/types/core/constants.d.ts +7 -0
  112. package/types/core/view/view.d.ts +4 -0
  113. package/types/langs/ar.d.ts +1 -0
  114. package/types/langs/de.d.ts +1 -0
  115. package/types/langs/es.d.ts +1 -0
  116. package/types/langs/fi.d.ts +1 -0
  117. package/types/langs/fr.d.ts +4 -0
  118. package/types/langs/he.d.ts +1 -0
  119. package/types/langs/hu.d.ts +1 -0
  120. package/types/langs/it.d.ts +1 -0
  121. package/types/langs/ja.d.ts +1 -0
  122. package/types/langs/mn.d.ts +1 -0
  123. package/types/langs/nl.d.ts +1 -0
  124. package/types/langs/no.d.ts +22 -0
  125. package/types/langs/pl.d.ts +1 -0
  126. package/types/langs/pt_br.d.ts +1 -0
  127. package/types/langs/tr.d.ts +1 -0
  128. package/types/langs/zh_cn.d.ts +1 -0
  129. package/types/langs/zh_tw.d.ts +2 -0
  130. package/types/types/view.d.ts +6 -1
@@ -207,5 +207,7 @@ declare const _exports: {
207
207
  'Find Next': string;
208
208
  'Insert className': string;
209
209
  'Press Alt for custom resizing': string;
210
+ Edit: string;
211
+ 'License: %s': string;
210
212
  };
211
213
  export = _exports;
@@ -4,6 +4,7 @@
4
4
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
6
 
7
+ // Chinese Traditional (繁體中文)
7
8
  export default {
8
9
  'Type something': '輸入一些內容',
9
10
  Advanced: '進階',
@@ -218,5 +219,7 @@ export default {
218
219
  'Find Previous': '尋找上一個',
219
220
  'Find Next': '尋找下一個',
220
221
  'Insert className': '插入 class 名稱',
221
- 'Press Alt for custom resizing': '按住 Alt 以調整自訂大小'
222
+ 'Press Alt for custom resizing': '按住 Alt 以調整自訂大小',
223
+ Edit: '編輯',
224
+ 'License: %s': '許可證: %s'
222
225
  };
@@ -20,5 +20,5 @@ export function dataURItoBlob(dataURI) {
20
20
  for (let i = 0; i < byteString.length; i += 1) {
21
21
  ia[i] = byteString.charCodeAt(i);
22
22
  }
23
- return new Blob([ia], { type: mimeString });
23
+ return new Blob([ia.buffer], { type: mimeString });
24
24
  }
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { IS_INLINE } from "../../../../../core/constants.js";
7
7
  import { Dom } from "../../../../../core/dom/dom.js";
8
- import { trim } from "../../../../../core/helpers/string/trim.js";
8
+ import { trimInv } from "../../../../../core/helpers/string/trim.js";
9
9
  /**
10
10
  * @private
11
11
  */
@@ -34,6 +34,6 @@ function isRemovableNode(jodit, node, current, allow, deny) {
34
34
  return (Dom.isElement(node) &&
35
35
  node.nodeName.match(IS_INLINE) != null &&
36
36
  !Dom.isTemporary(node) &&
37
- trim(node.innerHTML).length === 0 &&
37
+ trimInv(node.innerHTML).length === 0 &&
38
38
  (current == null || !Dom.isOrContains(node, current)));
39
39
  }
@@ -42,7 +42,11 @@ interface IViewOptions extends ILanguageOptions, IToolbarOptions {
42
42
  cache?: boolean;
43
43
  getIcon?: (name: string, clearName: string) => CanUndef<string>;
44
44
  headerButtons?: string | Array<IControlType | string | ButtonsGroup>;
45
- basePath?: string;
45
+ readonly basePath?: string;
46
+ /**
47
+ * Plugin autoloader should load minified version of the file
48
+ */
49
+ readonly minified?: boolean;
46
50
  theme?: string;
47
51
  defaultTimeout?: number;
48
52
  disabled?: boolean;
@@ -71,6 +75,7 @@ interface IViewBased<T = IViewOptions> extends IContainer, IComponent, IMods, IE
71
75
  */
72
76
  readonly id: string;
73
77
  readonly basePath: string;
78
+ readonly minified: boolean;
74
79
  readonly isLocked: boolean;
75
80
  isLockedNotBy(name: string): boolean;
76
81
  lock(name?: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jodit",
3
- "version": "4.6.1",
3
+ "version": "4.6.4",
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",
@@ -130,7 +130,14 @@ export declare const INSERT_ONLY_TEXT = "insert_only_text";
130
130
  export declare const SAFE_COUNT_CHANGE_CALL = 10;
131
131
  export declare const IS_MAC: boolean;
132
132
  export declare const KEY_ALIASES: IDictionary<string>;
133
+ /**
134
+ * Path to the current script
135
+ */
133
136
  export declare const BASE_PATH: string;
137
+ /**
138
+ * Current script is minified
139
+ */
140
+ export declare const BASE_PATH_IS_MIN: boolean;
134
141
  export declare const TEMP_ATTR = "data-jodit-temp";
135
142
  export declare const lang: IDictionary<IDictionary<string>>;
136
143
  export declare const CLIPBOARD_ID = "clipboard";
@@ -31,6 +31,10 @@ export declare abstract class View extends Component implements IViewBased, Mods
31
31
  * Get a path for loading extra staff
32
32
  */
33
33
  get basePath(): string;
34
+ /**
35
+ * Plugin autoloader should load minified version of the file
36
+ */
37
+ get minified(): boolean;
34
38
  static readonly ES: 'es5' | 'es2015' | 'es2018' | 'es2021';
35
39
  static readonly version: string;
36
40
  static readonly esNext: boolean;
@@ -211,5 +211,6 @@ declare const _exports: {
211
211
  'Line height': string;
212
212
  spellcheck: string;
213
213
  'Speech Recognize': string;
214
+ All: string;
214
215
  };
215
216
  export = _exports;
@@ -213,5 +213,6 @@ declare const _exports: {
213
213
  'Find Next': string;
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
+ 'License: %s': string;
216
217
  };
217
218
  export = _exports;
@@ -213,5 +213,6 @@ declare const _exports: {
213
213
  'Find Next': string;
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
+ 'License: %s': string;
216
217
  };
217
218
  export = _exports;
@@ -214,5 +214,6 @@ declare const _exports: {
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
216
  'Class name': string;
217
+ 'License: %s': string;
217
218
  };
218
219
  export = _exports;
@@ -205,5 +205,9 @@ declare const _exports: {
205
205
  'Find Next': string;
206
206
  'Insert className': string;
207
207
  'Press Alt for custom resizing': string;
208
+ 'Embed code': string;
209
+ Edit: string;
210
+ All: string;
211
+ 'License: %s': string;
208
212
  };
209
213
  export = _exports;
@@ -208,5 +208,6 @@ declare const _exports: {
208
208
  'Find Next': string;
209
209
  'Insert className': string;
210
210
  'Press Alt for custom resizing': string;
211
+ 'License: %s': string;
211
212
  };
212
213
  export = _exports;
@@ -210,5 +210,6 @@ declare const _exports: {
210
210
  'Find Next': string;
211
211
  'Insert className': string;
212
212
  'Press Alt for custom resizing': string;
213
+ 'License: %s': string;
213
214
  };
214
215
  export = _exports;
@@ -213,5 +213,6 @@ declare const _exports: {
213
213
  'Find Next': string;
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
+ 'License: %s': string;
216
217
  };
217
218
  export = _exports;
@@ -213,5 +213,6 @@ declare const _exports: {
213
213
  'Upper Roman': string;
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
+ 'License: %s': string;
216
217
  };
217
218
  export = _exports;
@@ -208,5 +208,6 @@ declare const _exports: {
208
208
  'Find Next': string;
209
209
  'Insert className': string;
210
210
  'Press Alt for custom resizing': string;
211
+ 'License: %s': string;
211
212
  };
212
213
  export = _exports;
@@ -209,5 +209,6 @@ declare const _exports: {
209
209
  'Find Next': string;
210
210
  'Insert className': string;
211
211
  'Press Alt for custom resizing': string;
212
+ 'License: %s': string;
212
213
  };
213
214
  export = _exports;
@@ -196,5 +196,27 @@ declare const _exports: {
196
196
  'Copy selection': string;
197
197
  'Paste from clipboard': string;
198
198
  Find: string;
199
+ 'Embed code': string;
200
+ Edit: string;
201
+ All: string;
202
+ 'License: %s': string;
203
+ 'You can only edit your own images. Download this image on the host?': string;
204
+ 'The image has been successfully uploaded to the host!': string;
205
+ 'There are no files': string;
206
+ Rename: string;
207
+ 'Enter new name': string;
208
+ download: string;
209
+ "Your browser doesn't support direct access to the clipboard.": string;
210
+ copy: string;
211
+ 'Border radius': string;
212
+ Apply: string;
213
+ 'Please fill out this field': string;
214
+ 'Please enter a web address': string;
215
+ Default: string;
216
+ Circle: string;
217
+ Dot: string;
218
+ Quadrate: string;
219
+ 'Find Previous': string;
220
+ 'Find Next': string;
199
221
  };
200
222
  export = _exports;
@@ -208,5 +208,6 @@ declare const _exports: {
208
208
  'Find Next': string;
209
209
  'Insert className': string;
210
210
  'Press Alt for custom resizing': string;
211
+ 'License: %s': string;
211
212
  };
212
213
  export = _exports;
@@ -213,5 +213,6 @@ declare const _exports: {
213
213
  'Find Next': string;
214
214
  'Insert className': string;
215
215
  'Press Alt for custom resizing': string;
216
+ 'License: %s': string;
216
217
  };
217
218
  export = _exports;
@@ -208,5 +208,6 @@ declare const _exports: {
208
208
  'Find Next': string;
209
209
  'Insert className': string;
210
210
  'Press Alt for custom resizing': string;
211
+ 'License: %s': string;
211
212
  };
212
213
  export = _exports;
@@ -209,5 +209,6 @@ declare const _exports: {
209
209
  'Find Next': string;
210
210
  'Insert className': string;
211
211
  'Press Alt for custom resizing': string;
212
+ 'License: %s': string;
212
213
  };
213
214
  export = _exports;
@@ -207,5 +207,7 @@ declare const _exports: {
207
207
  'Find Next': string;
208
208
  'Insert className': string;
209
209
  'Press Alt for custom resizing': string;
210
+ Edit: string;
211
+ 'License: %s': string;
210
212
  };
211
213
  export = _exports;
@@ -42,7 +42,11 @@ interface IViewOptions extends ILanguageOptions, IToolbarOptions {
42
42
  cache?: boolean;
43
43
  getIcon?: (name: string, clearName: string) => CanUndef<string>;
44
44
  headerButtons?: string | Array<IControlType | string | ButtonsGroup>;
45
- basePath?: string;
45
+ readonly basePath?: string;
46
+ /**
47
+ * Plugin autoloader should load minified version of the file
48
+ */
49
+ readonly minified?: boolean;
46
50
  theme?: string;
47
51
  defaultTimeout?: number;
48
52
  disabled?: boolean;
@@ -71,6 +75,7 @@ interface IViewBased<T = IViewOptions> extends IContainer, IComponent, IMods, IE
71
75
  */
72
76
  readonly id: string;
73
77
  readonly basePath: string;
78
+ readonly minified: boolean;
74
79
  readonly isLocked: boolean;
75
80
  isLockedNotBy(name: string): boolean;
76
81
  lock(name?: string): boolean;