Releases: xdan/jodit
Releases · xdan/jodit
Release list
4.14.5
🏠 Internal
- Upgraded ESLint 9 to 10 and
@eslint/js9 to 10. Replaced the unmaintainedeslint-plugin-importwith ESLint 10-compatibleeslint-plugin-import-x4, removed the obsolete compatibility wrapper, and upgradedeslint-plugin-mochato 12 and Mocha to 12. - Migrated the release/build scripts from the vulnerable
replacepackage toreplace-in-file9. ESLint 10's new checks removed redundant assignments and test errors now preserve their originalcause. - Updated the screenshot-test image and its packages to Playwright 1.63.0 and refreshed affected browser snapshots. Fixed the Make target so
updateTests=falseno longer enables snapshot updates. Forced the patchedqs6.16.0 for Karma's server dependencies;npm auditnow reports no known vulnerabilities. - Kept TypeScript at 6.0.3 because typescript-eslint does not yet support TypeScript 7 and the project build tools use the compiler API removed from TypeScript 7. Kept
cssnano-preset-advancedat 8.0.10 because version 9 fails while loading itscaniuse-apidependency under the TypeScript Webpack configuration.
4.14.4
🏠 Internal
- Updated development dependencies within their existing version ranges and refreshed transitive dependencies in
package-lock.json. Highlights: Playwright 1.63.0, SWC 1.16.2, TypeScript 6.0.3, typescript-eslint 8.70.0, Less 4.9.1, PostCSS 8.5.28, Stylelint 17.15.0 and Webpack 5.110.3. - Major upgrades are handled separately: ESLint remains on 9, Mocha on 11 and cssnano-preset-advanced on 8 in this release.
4.14.3
🐛 Bug Fix
- Selection:
save(),fakes(),remove()andwrapInTag()leave selections crossing the editor boundary untouched.isInsideAreachecks both boundaries, andrestoreFakes()ignores nodes moved outside the editor. - 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. - 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.
- 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.
- Selection / Shadow DOM:
save()finds markers inside the editor's shadow tree and keeps the saved selection active. - 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;
ApplyStylealso 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. - Formatting / CSS: explicit property resets such as
color: nullno 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 skipscontenteditable="false"blocks and preserves styles inside protected inline content. - Formatting / links: extracting selected text no longer removes links from adjacent, unselected images by treating image-only fragments as empty.
- Formatting / classes and lists:
classandclassNameaccept multiple class tokens. Adjacent lists are matched correctly with multiple classes and numeric or boolean attributes. Removing a class firesafterToggleAttributeeven when other classes remain. - TypeScript: corrected the declared argument order of
beforeToggleListand the modes/return type ofbeforeUnwrapListto match existing runtime behavior. Runtime hook signatures are unchanged. - Languages: added missing Azerbaijani translations for
Line height,Spellcheck,Speech Recognizeandnewline.
🏠 Internal
- Simplified style iteration with
for…ofand 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. - 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.
4.14.2
🏠 Internal
- Dev dependencies: webpack 5.109.2, less-loader 13, webpack-dev-middleware 8, eslint-plugin-simple-import-sort 14 (imports re-sorted), @types/node 26, synchronous-promise 2.0.18, cssnano-preset-advanced 8.0.10 (#1446, #1447, #1448, #1450, #1452, #1454, #1456). eslint 10 / eslint-plugin-mocha 12 stay on hold until
eslint-plugin-importallows eslint 10; TypeScript 7 needs a tsconfig migration first.
4.14.1
🏠 Internal
- Release pipeline: the
jodit-reactandjodit-prorelease triggers, paused for the 4.14.0 rollout, are back on. Both wrappers were bumped to a new minor by hand (jodit-react5.5.0,jodit-pro4.14.0,jodit-pro-react5.6.0); this release lets the bots publish their first builds on top of it.
4.14.0
🏠 Internal
- DOM access goes through the
Dommodule only. Groundwork for virtual-DOM editing, no public API changes: parameter types are widened, return types untouched. Newsrc/types/vdom.d.tsdescribes 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. TheDommutation/structural core (append,prepend,after,before,appendChildFirst,detach,unwrap,moveContent,sibling,hide/show) is typed against that subset and deduplicated (first/lastshare one traversal,prevWithClass/nextWithClassshare one helper). A new Virtual DOM contract suite indom.test.jsrunsDomagainst a non-browser VNode implementation, pinning the invariant at runtime. Acrosscore,modules,pluginsandjodit.ts: no directappendChild/insertBefore/removeChild/replaceChildleft outsideDom(was ~207 call sites),.style.x =→css()/VStyle,get/setAttribute→attr(),querySelectorreduced to the sanctioned boundaries (user-supplied selectors inselector.ts, pasted stylesheet selectors inapply-styles.ts, theBASE_PATHbootstrap inconstants.ts, the sanitizers). #1441 - Dialog: open dialogs are tracked in a static registry;
setMaxZIndex/getMaxZIndexDialogread it instead of scanning the wholedestinationsubtree (usuallydocument.body) on every open and mousedown.
🚀 New Feature
cssInline(element, key): exact inline read of a CSS property (thestyleattribute) — no computed style, no layout access, no number/color normalization.css(element, key, true)still works but is deprecated: its result goes throughnormalizeCssValue('0px'→0,bold→700), which made it unusable for exact comparisons and save/restore. Internal call sites (popup/dialog z-index, indent, resizer, media, image properties readers, table widths) migrated.attrRaw(element, name, value?): attribute access with the name taken verbatim — no camelCase → kebab-case conversion, nodata-fallback, nopxstripping. Used by the sanitizers (safeHTML,cleanHTML.allowTags,cleanFromWord) and attribute comparison, whereattr()'s name normalization must never apply (onLoad,viewBox,xlink:href).VTokenList.lengthadded to the VNode subset.
🐛 Bug Fix
- Paste from Word: attribute cleanup on inline SVG (
viewBox,preserveAspectRatio, …) silently skipped those attributes because the removal went throughattr(), which kebab-cased the names. UsesattrRawnow. - Uploader:
bind(form)matches<input type="FILE">again (attribute selectors are case-insensitive, theattr()comparison was not). - Dialog / Resize cells: dialog position and the cell resize handle keep fractional pixels; the numeric
css()setter truncated them to integers. - Resizer: an image with an inline
width: 0pxis treated as having an inline size again (cssInlinekeeps the raw'0px'wherecss(..., true)returned0).
💅 Polish
Dom.temporaryListis no longer deprecated: it is the history snapshot cleanup and is a plain tree walk (no selector engine, works onVNode).alignElementlooks the command up in aMapinstead of a plain object (no prototype keys).- Toolbar/plugin tag sets (
Dom.isTag(node, Set)) hoisted to module constants instead of being allocated per visited node. element.innerHTML = ''clears replaced withDom.detach(element)(table rows, tooltip, paste storage, delete, debug, inline container).
4.13.27
🚀 New Feature
- Formatting / Lists: applying a CSS style (text color, background, font size, font family) to a fully selected list item now puts the style on the
<li>itself instead of wrapping the content in a<span>, so the bullet or number gets the same color and size as the text. Partially selected items, items with a nested list and element formats such as bold/italic keep wrapping the content as before; applying the same style again toggles it off the item. #1460
4.13.26
🐛 Bug Fix
- Color picker: pressing Enter in the hex input applied the color and closed the popup, but Chrome then fired
changeon the removed, still-focused input, so the same color was applied a second time and toggled off again. The widget now applies a typed value only once. #1459 - Toolbar: closing a button popup by clicking outside while the hex input had focus threw
NotFoundError: Failed to execute 'removeChild'. Chrome firesblur/changein the middle ofremoveChild, the color callback re-entered the button's close routine, and it destructed the popup while the outer removal was still running.ToolbarButtonnow detaches the popup before closing it so a re-entrant close is a no-op, andPopup.close()blurs a focused control before removing the container so that Chrome and Firefox both run those handlers while the popup is still in the DOM (Firefox never fired them for a removed element, so the typed color was silently dropped there). #1458
4.13.25
🐛 Bug Fix
- Decorators:
@cacheHTML(used byUIButton.createContainerandToolbarButton.createContainer) kept a single template element per class for the whole page lifetime, keyed only by the constructor. When an editor was created inside an iframe (ownerDocument/ownerWindowoptions) and that iframe was later removed, every subsequent editor receivedcloneNodecopies of a template that belonged to the destroyed document, and its toolbar buttons rendered but never reacted to clicks. The cache is now keyed by the owner document first and only then by the class, so each document builds its own templates. #1457
4.13.24
🐛 Bug Fix
- Selection: applying a block format while the selection sat in bare text inside a container block (e.g. a
<div>that also holds paragraphs) replaced the whole container with the new element, merging all its blocks into one heading. The nearest-block search now skips container blocks that have block-level children and wraps the selected text island in a new block inside the container instead. Additionally, toggling a block format off inside a container (an<h3>inside a<div>) used to bare-unwrap the element, leaving orphan inline text that thewrapNodesplugin only restores at the editor root; such a block is now replaced with the default paragraph tag. Reported by Kevin Sormann (li-life web+it, Jodit PRO).