jodit 4.14.2 → 4.14.3

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 (71) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +7 -7
  4. package/es2015/jodit.js +469 -313
  5. package/es2015/jodit.min.js +5 -5
  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.fat.min.js +7 -7
  13. package/es2018/jodit.min.js +5 -5
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +9 -9
  18. package/es2021/jodit.js +456 -304
  19. package/es2021/jodit.min.js +6 -6
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +5 -5
  28. package/es2021.en/jodit.js +395 -251
  29. package/es2021.en/jodit.min.js +5 -5
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +701 -381
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/core/selection/helpers/index.js +5 -2
  52. package/esm/core/selection/selection.d.ts +8 -5
  53. package/esm/core/selection/selection.js +267 -159
  54. package/esm/core/selection/style/api/extract.js +1 -3
  55. package/esm/core/selection/style/api/is-same-attributes.js +5 -2
  56. package/esm/core/selection/style/api/toggle-attributes.js +27 -10
  57. package/esm/core/selection/style/api/unwrap-children.js +39 -33
  58. package/esm/core/selection/style/apply-style.js +23 -25
  59. package/esm/core/selection/style/commit-style.js +3 -0
  60. package/esm/core/selection/style/transactions.js +2 -1
  61. package/esm/langs/az.d.ts +223 -0
  62. package/esm/langs/az.js +240 -0
  63. package/esm/languages.js +2 -0
  64. package/esm/modules/history/snapshot.js +45 -20
  65. package/esm/types/style.d.ts +2 -2
  66. package/esm/types/types.d.ts +3 -0
  67. package/package.json +1 -1
  68. package/types/core/selection/selection.d.ts +8 -5
  69. package/types/langs/az.d.ts +223 -0
  70. package/types/types/style.d.ts +2 -2
  71. package/types/types/types.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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
package/es5/polyfills.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.14.2
4
+ * Version: v4.14.3
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.14.2
4
+ * Version: v4.14.3
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-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
5
5
  */
6
- export const APP_VERSION = "4.14.2";
6
+ export const APP_VERSION = "4.14.3";
7
7
  // prettier-ignore
8
8
  export const ES = "es2020";
9
9
  export const IS_ES_MODERN = true;
@@ -37,13 +37,16 @@ export function findCorrectCurrentNode(node, range, rightMode, isCollapsed, chec
37
37
  node = node.previousSibling;
38
38
  }
39
39
  else if (checkChild) {
40
- let current = child(node);
40
+ // The fallback to the previous child changes the traversal direction
41
+ // before the caller receives the updated rightMode.
42
+ const nextChild = (nd) => rightMode ? nd.lastChild : child(nd);
43
+ let current = nextChild(node);
41
44
  while (current) {
42
45
  if (current && Dom.isText(current)) {
43
46
  node = current;
44
47
  break;
45
48
  }
46
- current = child(current);
49
+ current = nextChild(current);
47
50
  }
48
51
  }
49
52
  }
@@ -90,9 +90,12 @@ export declare class Selection implements ISelect {
90
90
  * Restores user selections using marker invisible elements in the DOM.
91
91
  */
92
92
  restore(): void;
93
+ private __fakeSelections;
94
+ private __isBackward;
95
+ private __ranges;
93
96
  /**
94
97
  * Inserts invisible fake nodes on the boundaries of the current selection
95
- * and returns them. Unlike [[Select.save]] the selection stays valid while
98
+ * and returns the first pair as a restoration handle for all ranges. Unlike [[Select.save]] the selection stays valid while
96
99
  * the DOM around it is being modified. Restore it later with [[Select.restoreFakes]].
97
100
  */
98
101
  fakes(): [
@@ -102,10 +105,7 @@ export declare class Selection implements ISelect {
102
105
  Node,
103
106
  Node
104
107
  ];
105
- /**
106
- * Restores the selection previously saved with [[Select.fakes]]
107
- * and removes the fake nodes (disconnected fakes are ignored).
108
- */
108
+ /** Restore all ranges associated with the returned fake pair. */
109
109
  restoreFakes(fakes: [
110
110
  ] | [
111
111
  Node
@@ -166,6 +166,7 @@ export declare class Selection implements ISelect {
166
166
  * Call callback for all selection node
167
167
  */
168
168
  eachSelection(callback: (current: Node) => void): void;
169
+ private __eachRange;
169
170
  /**
170
171
  * Checks if the cursor is at the end(start) block
171
172
  *
@@ -208,6 +209,7 @@ export declare class Selection implements ISelect {
208
209
  * Set range selection
209
210
  */
210
211
  selectRange(range: Range, focus?: boolean): this;
212
+ private __selectRanges;
211
213
  /**
212
214
  * Select node
213
215
  * @param node - Node element
@@ -290,4 +292,5 @@ export declare class Selection implements ISelect {
290
292
  * becomes `<p>|<b>test</b>|</p>`)
291
293
  */
292
294
  expandSelection(): this;
295
+ private __expandRange;
293
296
  }