jodit 4.12.22 → 4.12.23
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.
- package/CHANGELOG.md +18 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +10 -10
- package/es2015/jodit.js +211 -69
- package/es2015/jodit.min.js +10 -10
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +10 -10
- package/es2018/jodit.min.js +15 -15
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +12 -12
- package/es2021/jodit.js +202 -68
- package/es2021/jodit.min.js +12 -12
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +13 -13
- package/es2021.en/jodit.js +180 -46
- package/es2021.en/jodit.min.js +12 -12
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +255 -104
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/component/view-component.js +8 -0
- package/esm/core/constants.js +1 -1
- package/esm/core/helpers/checker/is-html-from-word.d.ts +1 -1
- package/esm/core/helpers/checker/is-html-from-word.js +12 -1
- package/esm/core/selection/style/api/wrap.js +18 -3
- package/esm/core/ui/popup/popup.js +4 -1
- package/esm/jodit.js +12 -0
- package/esm/modules/toolbar/button/content.d.ts +6 -0
- package/esm/modules/toolbar/button/content.js +26 -1
- package/esm/plugins/add-new-line/add-new-line.js +4 -1
- package/esm/plugins/ai-assistant/ai-assistant.js +7 -1
- package/esm/plugins/backspace/cases/check-join-neighbors.js +15 -1
- package/esm/plugins/color/color.js +21 -21
- package/esm/plugins/inline-popup/inline-popup.d.ts +7 -0
- package/esm/plugins/inline-popup/inline-popup.js +18 -2
- package/esm/plugins/paste/config.js +11 -2
- package/esm/plugins/search/ui/search.js +22 -12
- package/esm/plugins/select-cells/select-cells.js +10 -6
- package/package.json +1 -1
- package/types/core/helpers/checker/is-html-from-word.d.ts +1 -1
- package/types/modules/toolbar/button/content.d.ts +6 -0
- package/types/plugins/inline-popup/inline-popup.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,24 @@
|
|
|
9
9
|
> - :house: [Internal]
|
|
10
10
|
> - :nail_care: [Polish]
|
|
11
11
|
|
|
12
|
+
## 4.12.23
|
|
13
|
+
|
|
14
|
+
#### :bug: Bug Fix
|
|
15
|
+
|
|
16
|
+
- **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).
|
|
17
|
+
- **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).
|
|
18
|
+
- **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).
|
|
19
|
+
- **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).
|
|
20
|
+
- **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).
|
|
21
|
+
- **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).
|
|
22
|
+
- **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).
|
|
23
|
+
- **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).
|
|
24
|
+
- **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).
|
|
25
|
+
- **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).
|
|
26
|
+
- **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).
|
|
27
|
+
- **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).
|
|
28
|
+
- **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).
|
|
29
|
+
|
|
12
30
|
## 4.12.22
|
|
13
31
|
|
|
14
32
|
#### :bug: Bug Fix
|
package/es2015/jodit.css
CHANGED