jodit 4.19.10 → 4.19.12

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 (98) hide show
  1. package/CHANGELOG.md +150 -131
  2. package/es2015/jodit.css +33 -1
  3. package/es2015/jodit.fat.min.css +1 -1
  4. package/es2015/jodit.fat.min.js +10 -10
  5. package/es2015/jodit.js +781 -195
  6. package/es2015/jodit.min.css +1 -1
  7. package/es2015/jodit.min.js +10 -10
  8. package/es2015/plugins/debug/debug.css +1 -1
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  14. package/es2018/jodit.fat.min.css +1 -1
  15. package/es2018/jodit.fat.min.js +10 -10
  16. package/es2018/jodit.min.css +1 -1
  17. package/es2018/jodit.min.js +10 -10
  18. package/es2018/plugins/debug/debug.min.js +1 -1
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  20. package/es2021/jodit.css +33 -1
  21. package/es2021/jodit.fat.min.css +1 -1
  22. package/es2021/jodit.fat.min.js +15 -15
  23. package/es2021/jodit.js +780 -193
  24. package/es2021/jodit.min.css +1 -1
  25. package/es2021/jodit.min.js +15 -15
  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 +33 -1
  33. package/es2021.en/jodit.fat.min.css +1 -1
  34. package/es2021.en/jodit.fat.min.js +22 -22
  35. package/es2021.en/jodit.js +780 -193
  36. package/es2021.en/jodit.min.css +1 -1
  37. package/es2021.en/jodit.min.js +22 -22
  38. package/es2021.en/plugins/debug/debug.css +1 -1
  39. package/es2021.en/plugins/debug/debug.js +1 -1
  40. package/es2021.en/plugins/debug/debug.min.js +1 -1
  41. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  42. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  43. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  44. package/es5/jodit.css +34 -2
  45. package/es5/jodit.fat.min.css +1 -1
  46. package/es5/jodit.fat.min.js +2 -2
  47. package/es5/jodit.js +827 -200
  48. package/es5/jodit.min.css +3 -3
  49. package/es5/jodit.min.js +2 -2
  50. package/es5/plugins/debug/debug.css +1 -1
  51. package/es5/plugins/debug/debug.js +1 -1
  52. package/es5/plugins/debug/debug.min.js +1 -1
  53. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  54. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  55. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  56. package/es5/polyfills.fat.min.js +1 -1
  57. package/es5/polyfills.js +1 -1
  58. package/es5/polyfills.min.js +1 -1
  59. package/esm/core/constants.js +1 -1
  60. package/esm/core/dom/dom.js +2 -2
  61. package/esm/core/helpers/checker/is-html-from-word.d.ts +4 -3
  62. package/esm/core/helpers/checker/is-html-from-word.js +94 -14
  63. package/esm/core/helpers/checker/is-html.d.ts +4 -0
  64. package/esm/core/helpers/checker/is-html.js +54 -2
  65. package/esm/core/helpers/html/apply-styles.js +20 -11
  66. package/esm/core/helpers/html/clean-from-word.js +2 -3
  67. package/esm/core/helpers/html/index.d.ts +1 -0
  68. package/esm/core/helpers/html/index.js +1 -0
  69. package/esm/core/helpers/html/tag-scan.d.ts +36 -0
  70. package/esm/core/helpers/html/tag-scan.js +257 -0
  71. package/esm/core/helpers/string/trim.d.ts +4 -0
  72. package/esm/core/helpers/string/trim.js +29 -10
  73. package/esm/core/selection/helpers/index.js +3 -2
  74. package/esm/core/ui/button/tooltip/tooltip.d.ts +6 -0
  75. package/esm/core/ui/button/tooltip/tooltip.js +14 -3
  76. package/esm/core/view/view-with-toolbar.js +6 -1
  77. package/esm/jodit.js +2 -1
  78. package/esm/plugins/add-new-line/add-new-line.d.ts +5 -0
  79. package/esm/plugins/add-new-line/add-new-line.js +20 -3
  80. package/esm/plugins/delete/delete.d.ts +7 -0
  81. package/esm/plugins/delete/delete.js +38 -2
  82. package/esm/plugins/hr/hr.js +5 -0
  83. package/esm/plugins/iframe/iframe.js +59 -12
  84. package/esm/plugins/media/media.js +10 -9
  85. package/esm/plugins/paste/helpers.js +4 -2
  86. package/esm/plugins/resizer/resizer.js +6 -5
  87. package/esm/plugins/select-cells/select-cells.d.ts +1 -0
  88. package/esm/plugins/select-cells/select-cells.js +12 -18
  89. package/package.json +1 -1
  90. package/types/core/helpers/checker/is-html-from-word.d.ts +4 -3
  91. package/types/core/helpers/checker/is-html.d.ts +4 -0
  92. package/types/core/helpers/html/index.d.ts +1 -0
  93. package/types/core/helpers/html/tag-scan.d.ts +36 -0
  94. package/types/core/helpers/string/trim.d.ts +4 -0
  95. package/types/core/ui/button/tooltip/tooltip.d.ts +6 -0
  96. package/types/plugins/add-new-line/add-new-line.d.ts +5 -0
  97. package/types/plugins/delete/delete.d.ts +7 -0
  98. package/types/plugins/select-cells/select-cells.d.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -9,6 +9,23 @@
9
9
  > - :house: [Internal]
10
10
  > - :nail_care: [Polish]
11
11
 
12
+ ## 4.19.12
13
+
14
+ #### :bug: Bug Fix
15
+
16
+ - [#1804](https://github.com/xdan/jodit/issues/1804) A drag over a table nested in a cell keeps the browser's own selection and marks the cell that holds the nested table, and releasing the mouse over the nested table still opens the cells popup; a cell Firefox selects whole is cleared instead of removed. Thanks @brendon.
17
+ - [#1803](https://github.com/xdan/jodit/issues/1803) An arrow key with the caret directly in the editor, beside a horizontal line, no longer adds a paragraph at the top.
18
+ - [#1807](https://github.com/xdan/jodit/issues/1807) The empty line the HR command and the add-new-line bar add gets a `<br>`, as Enter's does, so it keeps its height once the caret leaves it.
19
+ - [#1809](https://github.com/xdan/jodit/issues/1809) A wrapped iframe, video or audio shows in the editor where its line aligns it (`text-align: center/right`), as in the saved HTML.
20
+ - [#1811](https://github.com/xdan/jodit/issues/1811) Tooltips show for a toolbar placed outside the editor with the `toolbar` option.
21
+ - [#1812](https://github.com/xdan/jodit/issues/1812) Popups, dialogs and messages keep the page's text colour, weight, line height and alignment out; content with no style of its own now gets a normal line height and `text-align: start`.
22
+
23
+ ## 4.19.11
24
+
25
+ #### :bug: Bug Fix
26
+
27
+ - Security: `isHtmlFromWord` and `isHTML`, which run on every paste, used regexes that backtracked quadratically on crafted clipboard HTML (a long run of `<meta` or `<a`), so a 256 KB paste froze the tab for half a minute (CWE-1333, ReDoS). Both are single `indexOf` scans now, as are the other tag searches on the paste and value paths: the `<meta>` and Word wrapper clean-up, the selection marker, temporary element, media and iframe wrapper removal, the iframe document marker clean-up, `trim` and the `mso-` style filter. Reported by Jiawei Guo.
28
+
12
29
  ## 4.19.10
13
30
 
14
31
  #### :bug: Bug Fix
@@ -435,7 +452,7 @@ Thanks to Brendon Muir for all of the above.
435
452
 
436
453
  #### :bug: Bug Fix
437
454
 
438
- - Link dialog: a brand-new link inserted at a collapsed caret was left *selected* after the dialog closed. Safari does not paint that selection, so the link looked plain and the next Enter silently replaced it instead of starting a new line (Chrome/Firefox showed the same selection, just visibly). The caret is now placed right after the freshly inserted link; making a link out of a text selection keeps the selection as before. Reported by an OEM customer via the support tracker.
455
+ - Link dialog: a brand-new link inserted at a collapsed caret was left _selected_ after the dialog closed. Safari does not paint that selection, so the link looked plain and the next Enter silently replaced it instead of starting a new line (Chrome/Firefox showed the same selection, just visibly). The caret is now placed right after the freshly inserted link; making a link out of a text selection keeps the selection as before. Reported by an OEM customer via the support tracker.
439
456
 
440
457
  ## 4.15.5
441
458
 
@@ -483,7 +500,7 @@ Thanks to Brendon Muir for all of the above.
483
500
 
484
501
  #### :bug: Bug Fix
485
502
 
486
- - **File browser**: the **Download** item of the file context menu showed the *upload* icon (arrow pointing up into a tray). Added a dedicated `download` icon (arrow pointing down, same Font Awesome style as the rest of the set — also available via `Jodit.modules.Icon.get('download')`) and used it for that item. Fixes [#1472](https://github.com/xdan/jodit/issues/1472).
503
+ - **File browser**: the **Download** item of the file context menu showed the _upload_ icon (arrow pointing up into a tray). Added a dedicated `download` icon (arrow pointing down, same Font Awesome style as the rest of the set — also available via `Jodit.modules.Icon.get('download')`) and used it for that item. Fixes [#1472](https://github.com/xdan/jodit/issues/1472).
487
504
 
488
505
  ## 4.14.6
489
506
 
@@ -544,7 +561,7 @@ Thanks to Brendon Muir for all of the above.
544
561
 
545
562
  #### :house: Internal
546
563
 
547
- - **DOM access goes through the `Dom` module only.** Groundwork for virtual-DOM editing, no public API changes: parameter types are widened, return types untouched. New `src/types/vdom.d.ts` describes the structural subset of the browser DOM the editor relies on (`VNode`, `VElement`, `VHTMLElement`, `VStyle`, `VDocument`); browser nodes satisfy it, so existing call sites compile unchanged. The `Dom` mutation/structural core (`append`, `prepend`, `after`, `before`, `appendChildFirst`, `detach`, `unwrap`, `moveContent`, `sibling`, `hide`/`show`) is typed against that subset and deduplicated (`first`/`last` share one traversal, `prevWithClass`/`nextWithClass` share one helper). A new *Virtual DOM contract* suite in `dom.test.js` runs `Dom` against a non-browser VNode implementation, pinning the invariant at runtime. Across `core`, `modules`, `plugins` and `jodit.ts`: no direct `appendChild`/`insertBefore`/`removeChild`/`replaceChild` left outside `Dom` (was ~207 call sites), `.style.x =` → `css()`/`VStyle`, `get`/`setAttribute` → `attr()`, `querySelector` reduced to the sanctioned boundaries (user-supplied selectors in `selector.ts`, pasted stylesheet selectors in `apply-styles.ts`, the `BASE_PATH` bootstrap in `constants.ts`, the sanitizers). [#1441](https://github.com/xdan/jodit/pull/1441)
564
+ - **DOM access goes through the `Dom` module only.** Groundwork for virtual-DOM editing, no public API changes: parameter types are widened, return types untouched. New `src/types/vdom.d.ts` describes the structural subset of the browser DOM the editor relies on (`VNode`, `VElement`, `VHTMLElement`, `VStyle`, `VDocument`); browser nodes satisfy it, so existing call sites compile unchanged. The `Dom` mutation/structural core (`append`, `prepend`, `after`, `before`, `appendChildFirst`, `detach`, `unwrap`, `moveContent`, `sibling`, `hide`/`show`) is typed against that subset and deduplicated (`first`/`last` share one traversal, `prevWithClass`/`nextWithClass` share one helper). A new _Virtual DOM contract_ suite in `dom.test.js` runs `Dom` against a non-browser VNode implementation, pinning the invariant at runtime. Across `core`, `modules`, `plugins` and `jodit.ts`: no direct `appendChild`/`insertBefore`/`removeChild`/`replaceChild` left outside `Dom` (was ~207 call sites), `.style.x =` → `css()`/`VStyle`, `get`/`setAttribute` → `attr()`, `querySelector` reduced to the sanctioned boundaries (user-supplied selectors in `selector.ts`, pasted stylesheet selectors in `apply-styles.ts`, the `BASE_PATH` bootstrap in `constants.ts`, the sanitizers). [#1441](https://github.com/xdan/jodit/pull/1441)
548
565
  - **Dialog**: open dialogs are tracked in a static registry; `setMaxZIndex`/`getMaxZIndexDialog` read it instead of scanning the whole `destination` subtree (usually `document.body`) on every open and mousedown.
549
566
 
550
567
  #### :rocket: New Feature
@@ -650,7 +667,7 @@ Thanks to Brendon Muir for all of the above.
650
667
 
651
668
  #### :rocket: New Feature
652
669
 
653
- - **Uploader / insert popup**: new option `uploader.showTabInFileSelector` (default `true`). Set it to `false` to hide the *Upload* (drag-and-drop) tab in the image/file insert popup while keeping the uploader configured for the file browser — previously any configured uploader forced the tab to appear. Fixes [#1406](https://github.com/xdan/jodit/issues/1406).
670
+ - **Uploader / insert popup**: new option `uploader.showTabInFileSelector` (default `true`). Set it to `false` to hide the _Upload_ (drag-and-drop) tab in the image/file insert popup while keeping the uploader configured for the file browser — previously any configured uploader forced the tab to appear. Fixes [#1406](https://github.com/xdan/jodit/issues/1406).
654
671
 
655
672
  ## 4.13.14
656
673
 
@@ -775,9 +792,9 @@ Thanks to Brendon Muir for all of the above.
775
792
  - **Link dialog / `link.deriveUrlFromText`**: new opt-in option (default `false`). When the link dialog is opened for a new link with an empty URL field, the URL is pre-filled from the selected text when it looks like a URL or email — a bare domain gets `https://` (`example.com` → `https://example.com`), an email gets `mailto:`, an already-schemed URL is kept as is, and plain text is left untouched. Requested in [#1248](https://github.com/xdan/jodit/issues/1248) / [#1323](https://github.com/xdan/jodit/issues/1323).
776
793
  - **CSP `nonce` support**: added a `nonce` option that is applied to every `<style>`, `<script>` and `<link>` element Jodit injects at runtime (plugin styles, CDN scripts for ACE/beautify, downloaded stylesheets). Setting it to the nonce from your `Content-Security-Policy` header lets the editor run under a strict `style-src`/`script-src` policy without `'unsafe-inline'`. Requested in [#1276](https://github.com/xdan/jodit/issues/1276).
777
794
 
778
- ```js
779
- Jodit.make('#editor', { nonce: 'r4nd0m' });
780
- ```
795
+ ```js
796
+ Jodit.make('#editor', { nonce: 'r4nd0m' });
797
+ ```
781
798
 
782
799
  #### :memo: Documentation
783
800
 
@@ -858,7 +875,7 @@ Thanks to Brendon Muir for all of the above.
858
875
 
859
876
  #### :bug: Bug Fix
860
877
 
861
- - **Paste from Excel / "Keep" formatting**: content copied from MS Excel (and other apps that wrap the clipboard in a bare `<html>` tag) lost all styling — table cells styled by class in a `<style>` block (e.g. `.xl31 { background:#FCE4D6 }`, the typical Excel export) came in with no background, fonts or alignment. `applyStyles` (the *Paste as HTML → Keep* path) only inlined `<style>` rules when the opening tag carried attributes (`<html …>`, as Word emits); Excel emits a bare `<html>`, so the rules were never inlined and were dropped together with the `<style>` block. The opening `<html>` tag is now matched with or without attributes, so class-based styling is inlined onto the cells and survives. Reported in [#1362](https://github.com/xdan/jodit/issues/1362).
878
+ - **Paste from Excel / "Keep" formatting**: content copied from MS Excel (and other apps that wrap the clipboard in a bare `<html>` tag) lost all styling — table cells styled by class in a `<style>` block (e.g. `.xl31 { background:#FCE4D6 }`, the typical Excel export) came in with no background, fonts or alignment. `applyStyles` (the _Paste as HTML → Keep_ path) only inlined `<style>` rules when the opening tag carried attributes (`<html …>`, as Word emits); Excel emits a bare `<html>`, so the rules were never inlined and were dropped together with the `<style>` block. The opening `<html>` tag is now matched with or without attributes, so class-based styling is inlined onto the cells and survives. Reported in [#1362](https://github.com/xdan/jodit/issues/1362).
862
879
 
863
880
  ## 4.12.29
864
881
 
@@ -889,7 +906,7 @@ Thanks to Brendon Muir for all of the above.
889
906
  #### :rocket: New Feature
890
907
 
891
908
  - **Link dialog**: new opt-in option `link.ariaLabelInput` (default `false`) adds an **Aria label** text field to the Insert/Edit link form. It reads the existing `aria-label` when editing and writes it to the `<a>` on submit (clearing it when empty) — useful for accessibility when several links share the same visible text (e.g. multiple "here" links a screen reader can't tell apart). Addresses [#1204](https://github.com/xdan/jodit/issues/1204).
892
- - **Image editor**: new `afterImageEditorSave` event, fired when the user clicks **Save** / **Save as** in the image editor (crop/resize). The handler receives the action box `{ action: 'resize' | 'crop', box }` (and the new name for *Save as*), so you can react to the applied crop/resize — e.g. update the image's aspect ratio or set its real size. The existing `afterImageEditor` only fired when the editor *opened*. Addresses [#820](https://github.com/xdan/jodit/issues/820).
909
+ - **Image editor**: new `afterImageEditorSave` event, fired when the user clicks **Save** / **Save as** in the image editor (crop/resize). The handler receives the action box `{ action: 'resize' | 'crop', box }` (and the new name for _Save as_), so you can react to the applied crop/resize — e.g. update the image's aspect ratio or set its real size. The existing `afterImageEditor` only fired when the editor _opened_. Addresses [#820](https://github.com/xdan/jodit/issues/820).
893
910
  - **Uploader**: new `uploader.beforeUpload(files)` hook, called with the file list right before upload (or base64 read). Return `false` to abort — useful for client-side validation of size/type/count; `this` is the uploader (so `this.j` is the editor). Addresses [#1329](https://github.com/xdan/jodit/issues/1329).
894
911
  - **Table / Select cells**: **Ctrl/Cmd + click** now toggles individual cells into a non-contiguous selection (clicking an already-selected cell removes it), in addition to the existing click-and-drag rectangular selection. The cell properties popup opens for the accumulated selection, and toolbar actions (background color, etc.) apply to every selected cell. Previously each Ctrl+click reset the selection to the single clicked cell. Fixes [#1163](https://github.com/xdan/jodit/issues/1163).
895
912
  - **Backspace/Delete**: new option `delete.disableCases` (a `Set<string>`) lets you turn off individual Backspace/Delete cleanup behaviors that the plugin applies after the native deletion — e.g. `delete: { disableCases: new Set(['join-neighbors']) }` stops Backspace at the start of a paragraph from merging it into the previous one. Available keys: `remove-unbreakable`, `remove-not-editable`, `remove-char`, `table-cell`, `remove-empty-parent`, `remove-empty-neighbor`, `join-two-lists`, `join-neighbors`, `unwrap-first-list-item`. Addresses [#1060](https://github.com/xdan/jodit/issues/1060).
@@ -904,18 +921,18 @@ Thanks to Brendon Muir for all of the above.
904
921
  #### :bug: Bug Fix
905
922
 
906
923
  - **Search (Ctrl+F)**: pressing Enter in the search input **submitted the parent `<form>`** instead of jumping to the next match — the `preventDefault()` for Enter lived inside a debounced handler, so it ran only after the browser had already dispatched the form submission. Enter is now canceled synchronously, while the search logic itself stays debounced. Fixes [#918](https://github.com/xdan/jodit/issues/918).
907
- - **i18n / language bundles**: translations for keys that were missing from `ar.js` never reached the build — the master i18n key list was generated **only from `ar.js`**, and every other language is serialized as an array indexed by that list, so existing translations for the ordered-list menu items (*Lower Alpha*, *Lower Greek*, *Lower Roman*, *Upper Alpha*, *Upper Roman* — translated in de/es/fi/it/ja/pt_br) and a dozen other keys were silently dropped from every bundle. The key list is now built as the **union of all language files**. Fixes [#997](https://github.com/xdan/jodit/issues/997).
924
+ - **i18n / language bundles**: translations for keys that were missing from `ar.js` never reached the build — the master i18n key list was generated **only from `ar.js`**, and every other language is serialized as an array indexed by that list, so existing translations for the ordered-list menu items (_Lower Alpha_, _Lower Greek_, _Lower Roman_, _Upper Alpha_, _Upper Roman_ — translated in de/es/fi/it/ja/pt_br) and a dozen other keys were silently dropped from every bundle. The key list is now built as the **union of all language files**. Fixes [#997](https://github.com/xdan/jodit/issues/997).
908
925
  - **Custom `ownerWindow` (editor created inside an iframe)**: UI components (toolbar collection, popups, dialogs) always kept the **global** `window` as their owner window instead of the configured one. Popup/dropdown outside-click close handlers were therefore bound to the wrong window — clicks inside the iframe never reached them, so toolbar dropdowns did not close on an outside click. `ViewComponent` now inherits the owner window from its parent view. Fixes [#965](https://github.com/xdan/jodit/issues/965).
909
926
  - **Toolbar content controls (`getContent`)**: controls rendered through `getContent` (e.g. the FileBrowser **Upload** button) never ran the status calculation, so their `isDisabled`/`isActive`/`update` callbacks were silently ignored — the Upload button stayed enabled even when the backend permissions (`canI('FileUpload')`) said otherwise. `ToolbarContent.update()` now evaluates the control's status like regular toolbar buttons and also propagates the disabled state to nested form controls (the file `<input>` of the Upload button). Thanks @WatchfulEyeOfZod for the diagnosis and the patch draft. Fixes [#1094](https://github.com/xdan/jodit/issues/1094).
910
927
  - **Inline toolbar / Iframe mode**: with `iframe: true` the selection toolbar (`toolbarInlineForSelection`) opened far away from the selected text — the popup was positioned by `range.getBoundingClientRect()`, whose coordinates are **iframe-local**, while the popup itself lives in the host document. The iframe offset is now added to the selection bound. Fixes [#1058](https://github.com/xdan/jodit/issues/1058).
911
- - **Paste toolbar button**: the *Paste from clipboard* toolbar button inserted only the **plain text** flavor of the clipboard, while Ctrl+V pasted the full HTML — the button explicitly requested `text/plain` from `navigator.clipboard.read()` even when `text/html` was available. The button now prefers the HTML flavor (falling back to plain text), so both paste paths behave the same. Fixes [#1061](https://github.com/xdan/jodit/issues/1061).
928
+ - **Paste toolbar button**: the _Paste from clipboard_ toolbar button inserted only the **plain text** flavor of the clipboard, while Ctrl+V pasted the full HTML — the button explicitly requested `text/plain` from `navigator.clipboard.read()` even when `text/html` was available. The button now prefers the HTML flavor (falling back to plain text), so both paste paths behave the same. Fixes [#1061](https://github.com/xdan/jodit/issues/1061).
912
929
  - **Format block (H1–H6 / paragraph)**: applying a heading to a block pasted from an external source seemed to do nothing — the tag actually changed, but leftover inline styles like `font-weight: normal; font-size: 24px` visually overrode the new format, so an `<h2>` looked exactly like the old text. When a block format is applied, the conflicting `font-size`/`font-weight` inline styles are now removed from the block (other styles like color stay). Fixes [#1063](https://github.com/xdan/jodit/issues/1063).
913
930
  - **Backspace/Delete next to a table**: pressing Backspace at the start of a paragraph that follows a table (or Delete at the end of a paragraph before one) merged the paragraph's text **into the `<table>` element itself** — it landed after `</tbody>`, which is invalid HTML; on the next parse the browser foster-parents such content out of the table, corrupting the document and causing follow-up DOM errors (the `Failed to execute 'appendChild'` console spam from the report). The join logic now merges the text into the edge table **cell** (last cell for Backspace, first for Delete). Covers [#1064](https://github.com/xdan/jodit/issues/1064).
914
- - **Paste from Word (`askBeforePasteFromWord`)**: office content was frequently mis-detected as plain HTML, so the generic *Paste as HTML* dialog appeared instead of the Word one. The detector only matched a `Microsoft Word N` meta generator or `mso-` styles in **double** quotes combined with `<font>` tags — while the raw Word clipboard fragment uses **single-quoted** `style='mso-…'`, unquoted `class=MsoNormal`, an unquoted `ProgId` meta and office XML namespaces (and modern Word emits no `<font>` at all); LibreOffice/OpenOffice content was never detected. The detector now also recognizes all of these markers. Fixes [#1078](https://github.com/xdan/jodit/issues/1078).
931
+ - **Paste from Word (`askBeforePasteFromWord`)**: office content was frequently mis-detected as plain HTML, so the generic _Paste as HTML_ dialog appeared instead of the Word one. The detector only matched a `Microsoft Word N` meta generator or `mso-` styles in **double** quotes combined with `<font>` tags — while the raw Word clipboard fragment uses **single-quoted** `style='mso-…'`, unquoted `class=MsoNormal`, an unquoted `ProgId` meta and office XML namespaces (and modern Word emits no `<font>` at all); LibreOffice/OpenOffice content was never detected. The detector now also recognizes all of these markers. Fixes [#1078](https://github.com/xdan/jodit/issues/1078).
915
932
  - **Drag and drop (`enableDragAndDropFileToEditor: false`)**: dropping a file (e.g. a JPG from another window) into the editor still embedded it — with the option off no handler was bound to the `drop` event, nothing called `preventDefault`, and Firefox inserted the dropped image **natively**. With the option disabled the editor now cancels file drops, so they do nothing — as the option promises. Fixes [#1077](https://github.com/xdan/jodit/issues/1077).
916
- - **AI Assistant**: the *Insert After* button placed the generated text after the **first** node of the selection — with several selected paragraphs the result landed inside/after the first paragraph instead of after the whole selection. The insertion point is now the collapsed **end** of the selection, so the result follows everything that was selected; single-word/sentence behavior is unchanged. Fixes [#1263](https://github.com/xdan/jodit/issues/1263).
933
+ - **AI Assistant**: the _Insert After_ button placed the generated text after the **first** node of the selection — with several selected paragraphs the result landed inside/after the first paragraph instead of after the whole selection. The insertion point is now the collapsed **end** of the selection, so the result follows everything that was selected; single-word/sentence behavior is unchanged. Fixes [#1263](https://github.com/xdan/jodit/issues/1263).
917
934
  - **Color / Select cells**: applying a text or background color from the main toolbar to table cells selected with the `select-cells` plugin (click or drag-select a cell — typical for tables pasted from Word) silently did nothing: the cell selection drops or collapses the native range, so the color was committed as a pending caret format in an empty `<span>` **outside** the table. When cells are selected and the native selection is collapsed, the `forecolor`/`background` commands now recolor the content of every selected cell (including nested spans carrying their own Word colors). Fixes [#1250](https://github.com/xdan/jodit/issues/1250).
918
- - **Shadow DOM / Table**: clicking a table cell inside a Shadow DOM editor (the `shadowRoot` option, e.g. a Stencil/web component integration) never opened the cell properties popup (background, vertical align, split/merge, add/remove row & column). `document.elementFromPoint` does not pierce shadow boundaries — it returns the shadow **host** — so the `select-cells` plugin could not find the clicked cell on `mouseup`. The hit-testing now starts from the configured shadow root in `select-cells` (cell selection on click and drag-select), `add-new-line` (the *Break* line over tables/images) and `Popup.getKeepBound`. Fixes [#1312](https://github.com/xdan/jodit/issues/1312).
935
+ - **Shadow DOM / Table**: clicking a table cell inside a Shadow DOM editor (the `shadowRoot` option, e.g. a Stencil/web component integration) never opened the cell properties popup (background, vertical align, split/merge, add/remove row & column). `document.elementFromPoint` does not pierce shadow boundaries — it returns the shadow **host** — so the `select-cells` plugin could not find the clicked cell on `mouseup`. The hit-testing now starts from the configured shadow root in `select-cells` (cell selection on click and drag-select), `add-new-line` (the _Break_ line over tables/images) and `Popup.getKeepBound`. Fixes [#1312](https://github.com/xdan/jodit/issues/1312).
919
936
 
920
937
  ## 4.12.22
921
938
 
@@ -925,24 +942,24 @@ Thanks to Brendon Muir for all of the above.
925
942
  - **Source mode / multiple editors**: switching an editor into source mode focused its code mirror **unconditionally** — when the switch happened programmatically (e.g. a Vue/React wrapper re-initializing the editor) it pulled the focus out of the editor the user was typing in. The mirror is now focused only when the focus is not already inside another editor or control. Fixes [#1356](https://github.com/xdan/jodit/issues/1356) (follow-up to [#1313](https://github.com/xdan/jodit/issues/1313)).
926
943
  - **Limit (`limitChars` + `countTextSpaces`)**: the character limiter never counted spaces — even with `countTextSpaces: true` the limit applied to non-space characters only (`limitChars: 10` allowed `I am only 8` because only 8 visible characters were counted), while the status-bar counter showed the space-inclusive number. With `countTextSpaces: true` the limiter now counts characters the same way as the counter — including spaces. Fixes [#1144](https://github.com/xdan/jodit/issues/1144).
927
944
  - **Value assignment re-requested images (jodit-react)**: every `editor.value = …` assignment parsed the HTML into a helper element of the **live** document to sanitize it, so the browser issued a network request for every `<img>` in the value — with wrappers that sync the value on each change (e.g. jodit-react `onChange`), the image URLs were re-requested on every click/keystroke. The sanitize sandbox is now an **inert document** (`implementation.createHTMLDocument`), which never loads sub-resources; `Dom.isElement`/`Dom.isHTMLElement` no longer require a browsing context (`defaultView`), so the sanitizer keeps working on inert nodes. The internal `safeHTML` hook is now fired as an event for extensibility. Fixes [#1237](https://github.com/xdan/jodit/issues/1237).
928
- - **Inline toolbar (`toolbarInlineForSelection`)**: clicking a button in the selection toolbar (e.g. *Bold*) applied the command but closed the toolbar, even though the selection was still active — applying several formats required re-selecting the same text again and again. After a command fired from inside the popup, the selection toolbar is now reopened while the selection is not collapsed. Fixes [#1238](https://github.com/xdan/jodit/issues/1238).
945
+ - **Inline toolbar (`toolbarInlineForSelection`)**: clicking a button in the selection toolbar (e.g. _Bold_) applied the command but closed the toolbar, even though the selection was still active — applying several formats required re-selecting the same text again and again. After a command fired from inside the popup, the selection toolbar is now reopened while the selection is not collapsed. Fixes [#1238](https://github.com/xdan/jodit/issues/1238).
929
946
  - **Clean HTML (`allowTags`)**: when `cleanHTML.allowTags` was configured as a map with per-tag attribute rules (e.g. `{p: true, a: {href: true}}`) and the content contained a tag **outside** the list that had attributes (e.g. `<meta charset="utf-8">` from pasted e-mail HTML), the cleanup worker threw `TypeError: Cannot read properties of undefined` on every pass — the editor "crashed" on the first click and disallowed tags were never removed. The attribute filter now skips tags that are not in the allow list (the tags filter removes them). Fixes [#1224](https://github.com/xdan/jodit/issues/1224).
930
947
  - **Paste (plain text)**: pasting plain text containing a stray `<` (e.g. `TD}gy{<KMj3ScW1[efbi`) lost everything after the bracket — the clipboard text was inserted through the HTML path, so `<KMj3…` was parsed as an unclosed tag and swallowed the rest of the string. When the clipboard contains **only** `text/plain` (and it is not actual HTML), special characters are now escaped before insertion, so `<`, `>` and `&` survive as literal text; the `nl2brInPlainText` line-break conversion still applies after escaping. Fixes [#1227](https://github.com/xdan/jodit/issues/1227).
931
948
  - **i18n (Turkish)**: the Word/Excel paste prompt ("The pasted content is coming from a Microsoft Word/Excel document…") was shown in **German** when the editor language was set to Turkish — `langs/tr.js` contained a copy of the German translation for that key. Replaced with the proper Turkish text. Fixes [#1245](https://github.com/xdan/jodit/issues/1245).
932
- - **Dialog**: a dialog (e.g. *Paste as HTML*) could be resized by its corner handle to a size smaller than its own header, content and footer, so the footer buttons ended up rendered outside the dialog box. Interactive resizing is now clamped to a minimum size: `dialog.minWidth`/`dialog.minHeight` options when set, otherwise the sum of the header, the content's CSS `min-height` and the footer (and the footer buttons' row width). Fixes [#1262](https://github.com/xdan/jodit/issues/1262).
949
+ - **Dialog**: a dialog (e.g. _Paste as HTML_) could be resized by its corner handle to a size smaller than its own header, content and footer, so the footer buttons ended up rendered outside the dialog box. Interactive resizing is now clamped to a minimum size: `dialog.minWidth`/`dialog.minHeight` options when set, otherwise the sum of the header, the content's CSS `min-height` and the footer (and the footer buttons' row width). Fixes [#1262](https://github.com/xdan/jodit/issues/1262).
933
950
  - **Resize handler / Iframe**: resizing the **editor itself** by the statusbar handle was jerky in `iframe` mode — while dragging, the editor height jumped between two values. Same root cause as the image-resizer fix below: `mousemove` events proxied from the editor's iframe carry iframe-viewport coordinates and were mixed as-is with host-window ones; they are now shifted into the host coordinate space (checked via `e.view`). Fixes [#1287](https://github.com/xdan/jodit/issues/1287).
934
951
  - **Resizer / Iframe**: resizing an image (or table) by its handles was jerky in `iframe` mode (e.g. with `editHTMLDocumentMode`) — the size jumped while dragging, making it impossible to set precisely. During a drag, `mousemove` events arrive both from the host window (pointer over the resize frame) and proxied from the editor's iframe (pointer over the content), but the iframe-viewport coordinate correction was applied to **all** of them, so host-window events were shifted by the workplace offset. The correction is now applied only to events that originate from the iframe window (`e.view`). Fixes [#1264](https://github.com/xdan/jodit/issues/1264).
935
952
 
936
953
  #### :house: Internal
937
954
 
938
- - **Popup tests**: added a regression test asserting that with `allowTabNavigation: true` an inner popup (a dropdown opened from a button inside another popup — e.g. the image *Horizontal align* list) is positioned next to its trigger button. With that option the inner popup is appended into the button inside the outer popup, whose CSS `transform` shifts `position: fixed` coordinates; covers [#1265](https://github.com/xdan/jodit/issues/1265) (already fixed in 4.12.8 by the `getFixedPositionOffset` containing-block compensation from [#1350](https://github.com/xdan/jodit/issues/1350)).
955
+ - **Popup tests**: added a regression test asserting that with `allowTabNavigation: true` an inner popup (a dropdown opened from a button inside another popup — e.g. the image _Horizontal align_ list) is positioned next to its trigger button. With that option the inner popup is appended into the button inside the outer popup, whose CSS `transform` shifts `position: fixed` coordinates; covers [#1265](https://github.com/xdan/jodit/issues/1265) (already fixed in 4.12.8 by the `getFixedPositionOffset` containing-block compensation from [#1350](https://github.com/xdan/jodit/issues/1350)).
939
956
  - **Shadow DOM tests**: added regression tests asserting that with the `shadowRoot` option the image **resizer frame**, the **image properties dialog** (double click) and the **inline popup** all open correctly inside the shadow root. Covers the scenario from [#1109](https://github.com/xdan/jodit/issues/1109), which does not reproduce with a vanilla Shadow DOM.
940
957
  - **Tooltip tests**: added a regression test asserting that buttons inside the table-cell inline popup show their tooltip on hover. Covers [#1141](https://github.com/xdan/jodit/issues/1141), fixed back in 4.2.40.
941
958
  - **Image-processor tests**: added regression tests asserting that a base64 (`data:`) image is replaced with a `blob:` URL **only in the view** and never leaks into `editor.value`, the source element, the controlled-value loop (value re-assigned on every change, as jodit-react does) or the value left after `destruct()` (React remount). Covers the scenario from [#1244](https://github.com/xdan/jodit/issues/1244), which does not reproduce in the core editor.
942
959
  - **Selection tests**: added a regression test asserting that `editor.selection.insertHTML()` called after the editor lost focus (e.g. from a click handler on a non-focusable page element) inserts at the previously saved caret position instead of the start of the editor. Covers the scenario from [#1239](https://github.com/xdan/jodit/issues/1239), which does not reproduce on the current version in Chrome or Firefox.
943
960
  - **Color tests**: added a regression test asserting that applying a font color over a selection that includes a whole table recolors the text in **every** cell — including cells whose color sits on the `<td>` itself (as Word produces) rather than on inner spans. Covers the scenario from [#1221](https://github.com/xdan/jodit/issues/1221), which does not reproduce on the current version.
944
961
  - **Select-cells tests**: added a regression test asserting that the table cells popup stays open after a fast drag-select — including a pending trailing throttled `mousemove`, the Firefox redraw-hack cleanup, debounced history changes and the browser's `click` dispatched on the common `TR` ancestor. Covers the scenario from [#1174](https://github.com/xdan/jodit/issues/1174), which does not reproduce on the current version in Chrome or Firefox.
945
- - **Paste tests**: added regression tests asserting that Word's inter-word spaces placed in their own spans (`<span style="letter-spacing:-.5pt"> </span>`) survive pasting in every mode (*keep*, *clean*, *text*). Covers the scenario from [#1230](https://github.com/xdan/jodit/issues/1230), which does not reproduce on the current version (verified with the full table HTML from the issue).
962
+ - **Paste tests**: added regression tests asserting that Word's inter-word spaces placed in their own spans (`<span style="letter-spacing:-.5pt"> </span>`) survive pasting in every mode (_keep_, _clean_, _text_). Covers the scenario from [#1230](https://github.com/xdan/jodit/issues/1230), which does not reproduce on the current version (verified with the full table HTML from the issue).
946
963
  - **Resizer tests**: added a regression test asserting that in `iframe: true` + `editHTMLDocumentMode: true` mode the image resize frame is hidden when the iframe content is scrolled (the `iframe` plugin proxies the inner window's `scroll` event into the main window, where the `resizer` plugin listens). Covers the scenario from [#1266](https://github.com/xdan/jodit/issues/1266), which does not reproduce on the current version.
947
964
 
948
965
  ## 4.12.21
@@ -950,15 +967,15 @@ Thanks to Brendon Muir for all of the above.
950
967
  #### :bug: Bug Fix
951
968
 
952
969
  - **Security (stored XSS)**: the HTML sanitizer (`safeHTML`) stripped `on*` event handlers and `javascript:` links but left several executable constructs in the serialized editor value, so an application that re-rendered `editor.value` as trusted HTML could execute attacker script. It now also: drops `iframe[srcdoc]`; removes `data:text/html` / `data:application/xhtml` (and SVG `data:` URLs in `iframe`/`object`/`embed`/`frame`) sources; and strips `javascript:`/`vbscript:`/`livescript:`/`mocha:` from every URL-bearing attribute (`src`, `data`, `action`, `formaction`, `poster`, `background`, `xlink:href`), not just `<a href>`. Safe `data:image/*` sources (e.g. base64 PNG/SVG used in `<img>`) are preserved. Responsibly reported by Yuji Tounai ([@yousukezan](https://x.com/yousukezan)).
953
- - **Paste (Insert as Text)**: pasting multi-line content with the *Insert as Text* option lost its line breaks — the escaped text kept raw newlines that collapse to spaces when rendered. The *Insert as Text* path now converts newlines to `<br>` (gated on `nl2brInPlainText`, like the plain-text paste path). Fixes [#1093](https://github.com/xdan/jodit/issues/1093).
954
- - **Hotkeys**: the default keyboard shortcut for *Insert Unordered List* (`Ctrl/Cmd+Shift+8`) never fired — both variants were written as a single comma-joined string `'ctrl+shift+8, cmd+shift+8'` instead of two separate array entries, so the combined value never matched a real keypress. Fixes [#1079](https://github.com/xdan/jodit/issues/1079).
970
+ - **Paste (Insert as Text)**: pasting multi-line content with the _Insert as Text_ option lost its line breaks — the escaped text kept raw newlines that collapse to spaces when rendered. The _Insert as Text_ path now converts newlines to `<br>` (gated on `nl2brInPlainText`, like the plain-text paste path). Fixes [#1093](https://github.com/xdan/jodit/issues/1093).
971
+ - **Hotkeys**: the default keyboard shortcut for _Insert Unordered List_ (`Ctrl/Cmd+Shift+8`) never fired — both variants were written as a single comma-joined string `'ctrl+shift+8, cmd+shift+8'` instead of two separate array entries, so the combined value never matched a real keypress. Fixes [#1079](https://github.com/xdan/jodit/issues/1079).
955
972
  - **Color / Brush button**: the brush (text/background color) button never reflected the color under the caret. Its `update` handler computed the current color into the icon fill but then **unconditionally** reset `icon.fill` to an empty string on every toolbar update, discarding it — which also made the icon render invisibly against some themes (`editorCssClass`). The computed fill is now kept when a color is present (and only cleared when there is none). Fixes [#195](https://github.com/xdan/jodit/issues/195) and [#182](https://github.com/xdan/jodit/issues/182).
956
973
  - **Toolbar / Selection**: when a text selection was started inside the editor and the mouse button was released **outside** of the editable area (a drag-select that ends over the page), the editor never received the `mouseup` event, so the active state of toolbar buttons (Bold, Italic, etc.) was not recalculated and stayed stale. A document-level `mouseup` listener now re-fires `changeSelection` when the selection still belongs to the editor, so the toolbar updates correctly. Fixes [#1251](https://github.com/xdan/jodit/issues/1251).
957
- - **Media embed (YouTube & Vimeo)**: real-world share URLs were not converted to an embedded player. For YouTube, short links of the form `https://youtu.be/<id>?si=…` (the *Share* button format) and `?t=` timestamp links were inserted as plain text — the video id sits in the path but was only read when there was no query string — and `/shorts/<id>` / `/live/<id>` produced a broken `embed/shorts/<id>` src. For Vimeo, `?share=copy` tracking params and `channels/<name>/<id>` / `groups/<name>/videos/<id>` URLs produced a broken `video/channels/…` src. `convertMediaUrlToVideoEmbed` now extracts the video id (and the unlisted Vimeo hash) from the URL path, ignoring tracking params and channel/group/`embed`/`shorts`/`live` prefixes, and also recognises the `m.youtube.com` (mobile) and `music.youtube.com` hosts. Fixes [#1209](https://github.com/xdan/jodit/issues/1209).
958
- - **Indent / Lists**: the *Decrease Indent* (outdent) toolbar button stayed disabled when the cursor was inside a nested list item, even though `Shift+Tab` could un-nest it. The button's enabled state only considered an inline indent margin and ignored list nesting. It is now also enabled when the cursor sits in a list whose parent is another list item (matching the `tab` plugin's outdent behaviour). Fixes [#1247](https://github.com/xdan/jodit/issues/1247).
974
+ - **Media embed (YouTube & Vimeo)**: real-world share URLs were not converted to an embedded player. For YouTube, short links of the form `https://youtu.be/<id>?si=…` (the _Share_ button format) and `?t=` timestamp links were inserted as plain text — the video id sits in the path but was only read when there was no query string — and `/shorts/<id>` / `/live/<id>` produced a broken `embed/shorts/<id>` src. For Vimeo, `?share=copy` tracking params and `channels/<name>/<id>` / `groups/<name>/videos/<id>` URLs produced a broken `video/channels/…` src. `convertMediaUrlToVideoEmbed` now extracts the video id (and the unlisted Vimeo hash) from the URL path, ignoring tracking params and channel/group/`embed`/`shorts`/`live` prefixes, and also recognises the `m.youtube.com` (mobile) and `music.youtube.com` hosts. Fixes [#1209](https://github.com/xdan/jodit/issues/1209).
975
+ - **Indent / Lists**: the _Decrease Indent_ (outdent) toolbar button stayed disabled when the cursor was inside a nested list item, even though `Shift+Tab` could un-nest it. The button's enabled state only considered an inline indent margin and ignored list nesting. It is now also enabled when the cursor sits in a list whose parent is another list item (matching the `tab` plugin's outdent behaviour). Fixes [#1247](https://github.com/xdan/jodit/issues/1247).
959
976
  - **Uploader (base64)**: with `uploader.insertImageAsBase64URI = true`, dropping or pasting images in formats outside the default `imagesExtensions` list — notably `.svg`, `.bmp`, `.webp` — failed with `Need Url for Ajax Request` instead of being inlined as a data URI (the file fell through to the server-upload path). The default `imagesExtensions` now also includes `webp`, `bmp`, `svg`, `tiff` and `avif`. Fixes [#1228](https://github.com/xdan/jodit/issues/1228).
960
- - **Paste (Insert only Text)**: pasting multi-paragraph HTML with the *Insert only Text* option collapsed everything into a single paragraph — block boundaries became spaces, so the text could no longer be split into list items or separate blocks. `stripTags` gained an opt-in `blockBr` mode and the *Insert only Text* path now uses it (gated on `nl2brInPlainText`), so paragraphs are separated by `<br>`. The default `stripTags` behaviour (space-joined single-line plain text) is unchanged. Fixes [#1232](https://github.com/xdan/jodit/issues/1232).
961
- - **Paste from Word**: list items pasted from Microsoft Word kept their auto-generated marker text — the bullet glyph or the literal item number (`1.`, `2.`, …) leaked into the content as plain text. Word emits these markers inside `<span style="mso-list:Ignore">` elements that are explicitly flagged as display-only; both paste paths now drop those spans entirely instead of just stripping their attributes — `cleanFromWord` (the *Clean* / *As text* options) and `applyStyles` (the *Keep* / insert-as-HTML option). Fixes [#948](https://github.com/xdan/jodit/issues/948).
977
+ - **Paste (Insert only Text)**: pasting multi-paragraph HTML with the _Insert only Text_ option collapsed everything into a single paragraph — block boundaries became spaces, so the text could no longer be split into list items or separate blocks. `stripTags` gained an opt-in `blockBr` mode and the _Insert only Text_ path now uses it (gated on `nl2brInPlainText`), so paragraphs are separated by `<br>`. The default `stripTags` behaviour (space-joined single-line plain text) is unchanged. Fixes [#1232](https://github.com/xdan/jodit/issues/1232).
978
+ - **Paste from Word**: list items pasted from Microsoft Word kept their auto-generated marker text — the bullet glyph or the literal item number (`1.`, `2.`, …) leaked into the content as plain text. Word emits these markers inside `<span style="mso-list:Ignore">` elements that are explicitly flagged as display-only; both paste paths now drop those spans entirely instead of just stripping their attributes — `cleanFromWord` (the _Clean_ / _As text_ options) and `applyStyles` (the _Keep_ / insert-as-HTML option). Fixes [#948](https://github.com/xdan/jodit/issues/948).
962
979
 
963
980
  #### :house: Internal
964
981
 
@@ -991,7 +1008,7 @@ Thanks to Brendon Muir for all of the above.
991
1008
 
992
1009
  #### :bug: Bug Fix
993
1010
 
994
- - **DTD / Formatting**: applying an inline style (bold, underline, etc.) with the cursor on an empty line removed a `<br>` line break. The `removeExtraBr` cleanup (run after the style marker is inserted) deleted the following `<br>` even when real content followed it. It now only removes a *trailing* `<br>` (with nothing meaningful after it), so line breaks in the middle of a block are preserved. Fixes [#1302](https://github.com/xdan/jodit/issues/1302).
1011
+ - **DTD / Formatting**: applying an inline style (bold, underline, etc.) with the cursor on an empty line removed a `<br>` line break. The `removeExtraBr` cleanup (run after the style marker is inserted) deleted the following `<br>` even when real content followed it. It now only removes a _trailing_ `<br>` (with nothing meaningful after it), so line breaks in the middle of a block are preserved. Fixes [#1302](https://github.com/xdan/jodit/issues/1302).
995
1012
 
996
1013
  ## 4.12.15
997
1014
 
@@ -1065,21 +1082,21 @@ Thanks to Brendon Muir for all of the above.
1065
1082
 
1066
1083
  - Add `Jodit.configure()` static method for deep-merging partial options into global defaults without losing existing keys. Previously, overriding nested defaults like `controls` or `createAttributes` required setting each property individually. Now you can patch only the keys you need:
1067
1084
 
1068
- ```js
1069
- // Add a button without losing existing controls
1070
- Jodit.configure({
1071
- controls: {
1072
- myButton: { icon: 'pencil', command: 'selectall' }
1073
- }
1074
- });
1085
+ ```js
1086
+ // Add a button without losing existing controls
1087
+ Jodit.configure({
1088
+ controls: {
1089
+ myButton: { icon: 'pencil', command: 'selectall' }
1090
+ }
1091
+ });
1075
1092
 
1076
- // Partially update createAttributes
1077
- Jodit.configure({
1078
- createAttributes: {
1079
- div: { class: 'my-class' }
1080
- }
1081
- });
1082
- ```
1093
+ // Partially update createAttributes
1094
+ Jodit.configure({
1095
+ createAttributes: {
1096
+ div: { class: 'my-class' }
1097
+ }
1098
+ });
1099
+ ```
1083
1100
 
1084
1101
  #### :house: Internal
1085
1102
 
@@ -1101,23 +1118,23 @@ Thanks to Brendon Muir for all of the above.
1101
1118
 
1102
1119
  - Add `stream()` method to `Ajax` class for SSE (Server-Sent Events) streaming over XMLHttpRequest. Returns an `AsyncGenerator<string>` that yields parsed `data:` fields incrementally via `onprogress`.
1103
1120
 
1104
- ```js
1105
- const ajax = new Jodit.modules.Ajax({
1106
- method: 'POST',
1107
- url: '/api/ai/stream',
1108
- contentType: 'application/json',
1109
- data: { prompt: 'Hello' }
1110
- });
1111
-
1112
- try {
1113
- for await (const data of ajax.stream()) {
1114
- const event = JSON.parse(data);
1115
- editor.s.insertHTML(event.text);
1121
+ ```js
1122
+ const ajax = new Jodit.modules.Ajax({
1123
+ method: 'POST',
1124
+ url: '/api/ai/stream',
1125
+ contentType: 'application/json',
1126
+ data: { prompt: 'Hello' }
1127
+ });
1128
+
1129
+ try {
1130
+ for await (const data of ajax.stream()) {
1131
+ const event = JSON.parse(data);
1132
+ editor.s.insertHTML(event.text);
1133
+ }
1134
+ } finally {
1135
+ ajax.destruct();
1116
1136
  }
1117
- } finally {
1118
- ajax.destruct();
1119
- }
1120
- ```
1137
+ ```
1121
1138
 
1122
1139
  #### :memo: Documentation
1123
1140
 
@@ -1164,51 +1181,53 @@ Thanks to Brendon Muir for all of the above.
1164
1181
  #### :rocket: New Feature
1165
1182
 
1166
1183
  - `ProgressBar.showFileUploadAnimation(from?, to?)` — animated file icon that flies from a given point and fades out. Coordinates are relative to the editor container. Both `from` and `to` are optional with sensible defaults. The animation is automatically cleaned up on `destruct()`.
1167
- ```js
1168
- const editor = Jodit.make('#editor')
1169
- jodit.progressbar.showFileUploadAnimation();
1170
- ```
1184
+ ```js
1185
+ const editor = Jodit.make('#editor');
1186
+ jodit.progressbar.showFileUploadAnimation();
1187
+ ```
1171
1188
 
1172
1189
  ## 4.11.4
1173
1190
 
1174
1191
  #### :boom: Breaking Change
1175
1192
 
1176
1193
  - `.jodit-icon` `transform-origin` changed from `0 0 !important` to `var(--jd-icon-transform-origin)` (default `center`), and the `!important` flag was removed. If your layout depends on the old top-left origin, restore it via CSS:
1177
- ```css
1178
- :root {
1179
- --jd-icon-transform-origin: 0 0 !important;
1180
- }
1181
- ```
1194
+ ```css
1195
+ :root {
1196
+ --jd-icon-transform-origin: 0 0 !important;
1197
+ }
1198
+ ```
1182
1199
 
1183
1200
  #### :rocket: New Feature
1184
1201
 
1185
1202
  - `IUIIconState` now supports `scale` property — when set, applies `transform: scale(...)` to the SVG icon element, overriding the CSS variable
1186
1203
  - `IControlType.icon` now accepts `string | IUIIconState` — allows setting icon name, fill, iconURL, and scale directly from toolbar button config
1187
1204
 
1188
- Per-button scale example:
1189
- ```javascript
1190
- Jodit.make('#editor', {
1191
- buttons: Jodit.atom([
1192
- 'bold',
1193
- {
1194
- name: 'big-italic',
1195
- icon: { name: 'italic', fill: '', iconURL: '', scale: 1.5 },
1196
- tooltip: 'Italic (large icon)'
1197
- },
1198
- 'underline'
1199
- ])
1200
- });
1201
- ```
1205
+ Per-button scale example:
1206
+
1207
+ ```javascript
1208
+ Jodit.make('#editor', {
1209
+ buttons: Jodit.atom([
1210
+ 'bold',
1211
+ {
1212
+ name: 'big-italic',
1213
+ icon: { name: 'italic', fill: '', iconURL: '', scale: 1.5 },
1214
+ tooltip: 'Italic (large icon)'
1215
+ },
1216
+ 'underline'
1217
+ ])
1218
+ });
1219
+ ```
1202
1220
 
1203
1221
  - CSS custom properties `--jd-icon-transform-origin` and `--jd-icon-transform-scale` for global icon scaling. Override them to resize all editor icons at once. Per-button `scale` in `IUIIconState` takes priority over the CSS variable.
1204
1222
 
1205
- Global scale override via CSS:
1206
- ```css
1207
- :root {
1208
- --jd-icon-transform-scale: 1.3;
1209
- --jd-icon-transform-origin: center;
1210
- }
1211
- ```
1223
+ Global scale override via CSS:
1224
+
1225
+ ```css
1226
+ :root {
1227
+ --jd-icon-transform-scale: 1.3;
1228
+ --jd-icon-transform-origin: center;
1229
+ }
1230
+ ```
1212
1231
 
1213
1232
  ## 4.11.2
1214
1233
 
@@ -1291,7 +1310,7 @@ Thanks to Brendon Muir for all of the above.
1291
1310
  #### :rocket: New Feature
1292
1311
 
1293
1312
  - The `getRole():string` method has been added to `UIElement`. This allows you to set container roles for accessibility.
1294
- - The `UIGroup` role is set to list.
1313
+ - The `UIGroup` role is set to list.
1295
1314
 
1296
1315
  ## 4.9.7
1297
1316
 
@@ -1372,68 +1391,68 @@ feat: Create utility functions for file browser builders
1372
1391
  #### :rocket: New Feature
1373
1392
 
1374
1393
  - **AsyncStorage API with IndexedDB support**
1375
- - Added `AsyncStorage` class for asynchronous storage operations
1376
- - Implemented `IndexedDBProvider` for persistent browser storage with async API
1377
- - Support for multiple storage strategies: `indexedDB`, `localStorage`, `sessionStorage`, and in-memory fallback
1378
- - Comprehensive test coverage for all storage providers and async operations
1379
- - `canUseIndexedDB()` utility function to check IndexedDB availability
1394
+ - Added `AsyncStorage` class for asynchronous storage operations
1395
+ - Implemented `IndexedDBProvider` for persistent browser storage with async API
1396
+ - Support for multiple storage strategies: `indexedDB`, `localStorage`, `sessionStorage`, and in-memory fallback
1397
+ - Comprehensive test coverage for all storage providers and async operations
1398
+ - `canUseIndexedDB()` utility function to check IndexedDB availability
1380
1399
 
1381
1400
  #### :house: Internal
1382
1401
 
1383
1402
  - **Enhanced storage system**
1384
- - Refactored storage providers to support both sync and async interfaces
1385
- - Added workplace slots layout system for improved editor structure
1386
- - Comprehensive test suites for storage functionality (`storage.test.js`, `async-storage.test.js`)
1387
- - Added slot system tests (`slots.test.js`) for UI layout validation
1388
- - Improved CSS variable handling for slot dimensions
1389
- - Updated build configuration to use esbuild for ESM minification
1403
+ - Refactored storage providers to support both sync and async interfaces
1404
+ - Added workplace slots layout system for improved editor structure
1405
+ - Comprehensive test suites for storage functionality (`storage.test.js`, `async-storage.test.js`)
1406
+ - Added slot system tests (`slots.test.js`) for UI layout validation
1407
+ - Improved CSS variable handling for slot dimensions
1408
+ - Updated build configuration to use esbuild for ESM minification
1390
1409
 
1391
1410
  #### :bug: Bug Fix
1392
1411
 
1393
1412
  - **Fixed IndexedDB store name handling in AsyncStorage**
1394
- - Correctly construct database names with suffix for proper isolation
1395
- - Use consistent `keyValueStore` as the object store name
1413
+ - Correctly construct database names with suffix for proper isolation
1414
+ - Use consistent `keyValueStore` as the object store name
1396
1415
 
1397
1416
  ## 4.7.6
1398
1417
 
1399
1418
  #### :boom: Breaking Change
1400
1419
 
1401
1420
  - **`@autobind` decorator now only supports methods, not classes**
1402
- - Replaced external `autobind-decorator` dependency with internal implementation
1403
- - The old package is no longer maintained (last release was 7 years ago)
1404
- - **Migration Option 1** (Recommended): Apply `@autobind` to individual methods:
1405
- ```typescript
1406
- // Before (no longer supported):
1407
- @autobind
1408
- class MyClass {
1409
- method1() { }
1410
- method2() { }
1411
- }
1412
-
1413
- // After:
1414
- class MyClass {
1421
+ - Replaced external `autobind-decorator` dependency with internal implementation
1422
+ - The old package is no longer maintained (last release was 7 years ago)
1423
+ - **Migration Option 1** (Recommended): Apply `@autobind` to individual methods:
1424
+ ```typescript
1425
+ // Before (no longer supported):
1415
1426
  @autobind
1416
- method1() { }
1427
+ class MyClass {
1428
+ method1() {}
1429
+ method2() {}
1430
+ }
1417
1431
 
1418
- @autobind
1419
- method2() { }
1420
- }
1421
- ```
1422
- - **Migration Option 2** (If you need class-level binding): Install and use the original package directly:
1423
- ```bash
1424
- npm install autobind-decorator
1425
- ```
1426
- ```typescript
1427
- import autobind from 'autobind-decorator';
1432
+ // After:
1433
+ class MyClass {
1434
+ @autobind
1435
+ method1() {}
1428
1436
 
1429
- @autobind
1430
- class MyClass {
1431
- method1() { }
1432
- method2() { }
1433
- }
1434
- ```
1435
- Note: `autobind-decorator` package is no longer maintained, but it still works if you need class-level binding.
1436
- - Internal affected files: `data-provider.ts`, `resize-handler.ts`, `size.ts`, `recognize-manager.ts`
1437
+ @autobind
1438
+ method2() {}
1439
+ }
1440
+ ```
1441
+ - **Migration Option 2** (If you need class-level binding): Install and use the original package directly:
1442
+ ```bash
1443
+ npm install autobind-decorator
1444
+ ```
1445
+ ```typescript
1446
+ import autobind from 'autobind-decorator';
1447
+
1448
+ @autobind
1449
+ class MyClass {
1450
+ method1() {}
1451
+ method2() {}
1452
+ }
1453
+ ```
1454
+ Note: `autobind-decorator` package is no longer maintained, but it still works if you need class-level binding.
1455
+ - Internal affected files: `data-provider.ts`, `resize-handler.ts`, `size.ts`, `recognize-manager.ts`
1437
1456
 
1438
1457
  ## 4.7.5
1439
1458
 
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.19.10
4
+ * Version: v4.19.12
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1369,6 +1369,15 @@
1369
1369
  --jd-em-font-size: 1rem;
1370
1370
  }
1371
1371
  .jodit-ui-messages {
1372
+ font-family: var(--jd-font-default);
1373
+ font-size: var(--jd-font-size-default);
1374
+ color: var(--jd-color-text);
1375
+ font-style: normal;
1376
+ font-weight: normal;
1377
+ letter-spacing: normal;
1378
+ line-height: normal;
1379
+ text-align: start;
1380
+ text-transform: none;
1372
1381
  position: absolute;
1373
1382
  z-index: 3;
1374
1383
  right: 0;
@@ -1449,6 +1458,13 @@
1449
1458
  .jodit-dialog {
1450
1459
  font-family: var(--jd-font-default);
1451
1460
  font-size: var(--jd-font-size-default);
1461
+ color: var(--jd-color-text);
1462
+ font-style: normal;
1463
+ font-weight: normal;
1464
+ letter-spacing: normal;
1465
+ line-height: normal;
1466
+ text-align: start;
1467
+ text-transform: none;
1452
1468
  position: absolute;
1453
1469
  display: none;
1454
1470
  width: 0;
@@ -4151,6 +4167,12 @@ html.jodit_fullsize-box_true {
4151
4167
  * Released under MIT see LICENSE.txt in the project root for license information.
4152
4168
  * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
4153
4169
  */
4170
+ .jodit-ui-image-position-tab__lockMargin,
4171
+ .jodit-ui-image-properties-form__lockMargin,
4172
+ .jodit-ui-image-position-tab__lockSize,
4173
+ .jodit-ui-image-properties-form__lockSize {
4174
+ color: inherit;
4175
+ }
4154
4176
  .jodit-ui-image-position-tab__lockMargin > svg,
4155
4177
  .jodit-ui-image-properties-form__lockMargin > svg,
4156
4178
  .jodit-ui-image-position-tab__lockSize > svg,
@@ -4761,6 +4783,7 @@ html.jodit_fullsize-box_true {
4761
4783
  color: var(--jd-color-text);
4762
4784
  cursor: pointer;
4763
4785
  font-size: 16px;
4786
+ font-weight: normal;
4764
4787
  line-height: calc(var(--jd-height-element-default) * 1.2);
4765
4788
  text-align: center;
4766
4789
  text-decoration: none;
@@ -4974,6 +4997,7 @@ html.jodit_fullsize-box_true {
4974
4997
  }
4975
4998
  .jodit-ui-video-properties-form__lockSize {
4976
4999
  display: inline-block;
5000
+ color: inherit;
4977
5001
  cursor: pointer;
4978
5002
  }
4979
5003
  .jodit-ui-video-properties-form__lockSize > svg {
@@ -5290,6 +5314,7 @@ html.jodit_fullsize-box_true {
5290
5314
  background-color: var(--jd-color-background-gray);
5291
5315
  color: var(--jd-color-default);
5292
5316
  cursor: pointer;
5317
+ font-weight: normal;
5293
5318
  line-height: 1;
5294
5319
  text-decoration: none;
5295
5320
  user-select: none;
@@ -5691,6 +5716,13 @@ svg.jodit-icon {
5691
5716
  background: 0 0;
5692
5717
  float: none;
5693
5718
  outline: 0;
5719
+ color: var(--jd-color-text);
5720
+ font-style: normal;
5721
+ font-weight: normal;
5722
+ letter-spacing: normal;
5723
+ line-height: normal;
5724
+ text-align: start;
5725
+ text-transform: none;
5694
5726
  }
5695
5727
  .jodit {
5696
5728
  --jd-slot-top-height: auto;