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
package/CHANGELOG.md CHANGED
@@ -9,6 +9,27 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.14.3
13
+
14
+ #### :bug: Bug Fix
15
+
16
+ - **Selection**: `save()`, `fakes()`, `remove()` and `wrapInTag()` leave selections crossing the editor boundary untouched. `isInsideArea` checks both boundaries, and `restoreFakes()` ignores nodes moved outside the editor.
17
+ - **Selection / caret**: `current()` resolves the last text descendant when the caret follows a nested element and no longer returns a `<br>` outside the editor. Edge checks use the correct selection endpoint, including selections across blocks.
18
+ - **Selection / ranges and history**: preserve backward selections through save/restore, formatting, expansion and undo/redo, including iframe editors. Restore and format all native disjoint ranges in Firefox; selected HTML and node iteration include all ranges without duplicate callbacks. Existing history snapshots remain supported.
19
+ - **Selection / insertion**: invalid or unsupported cursor point lookups preserve the selection. Selecting the editor root selects its contents; positioning a cursor outside the root is rejected. Splitting validates the block, caret and optional edge before changing DOM. An empty sanitized fragment no longer deletes selected content, and insertion uses the surviving final child after hooks.
20
+ - **Selection / Shadow DOM**: `save()` finds markers inside the editor's shadow tree and keeps the saved selection active.
21
+ - **Formatting**: splitting a text node preserves live element offsets, so mixed text/element selection boundaries no longer omit part of the selected content. Temporary wrappers are cleaned up when callbacks throw or iteration stops early; `ApplyStyle` also restores the selection after a hook throws. Removed fragments are skipped when hooks replace or delete DOM, and formatting stops safely when a hook destroys the editor.
22
+ - **Formatting / CSS**: explicit property resets such as `color: null` no longer throw. Wrapper cleanup runs after all attributes have been applied, preserving subsequent CSS rules, classes and unrelated attributes. Applying styles across nested elements overrides overlapping properties without discarding other styles. Formatting skips `contenteditable="false"` blocks and preserves styles inside protected inline content.
23
+ - **Formatting / links**: extracting selected text no longer removes links from adjacent, unselected images by treating image-only fragments as empty.
24
+ - **Formatting / classes and lists**: `class` and `className` accept multiple class tokens. Adjacent lists are matched correctly with multiple classes and numeric or boolean attributes. Removing a class fires `afterToggleAttribute` even when other classes remain.
25
+ - **TypeScript**: corrected the declared argument order of `beforeToggleList` and the modes/return type of `beforeUnwrapList` to match existing runtime behavior. Runtime hook signatures are unchanged.
26
+ - **Languages**: added missing Azerbaijani translations for `Line height`, `Spellcheck`, `Speech Recognize` and `newline`.
27
+
28
+ #### :house: Internal
29
+
30
+ - Simplified style iteration with `for…of` and guaranteed selection cleanup, removed intermediate array copies from caret edge checks, reused CSS reset rules across nested elements, and reused one scratch DOM Range during containment traversal instead of allocating one per node.
31
+ - Added 92 selection and style regression/edge-case tests, including Shadow DOM, iframe, undo/redo, disjoint and backward selections, hook mutations, protected content, nested lists, CSS/attribute combinations and documents up to 3000 paragraphs. Browser suites verified in Chrome and Firefox; Chromium skips native multi-range cases it does not support.
32
+
12
33
  ## 4.14.2
13
34
 
14
35
  #### :house: Internal
package/es2015/jodit.css 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
  */