github xdan/jodit 4.12.24

5 hours ago

🚀 New Feature

  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • Clean HTML: new opt-in option cleanHTML.collapseEmptyValueToEmptyString (default false). When the editor holds only a single empty block — e.g. <p><br></p> left in the DOM after the user deletes all content (contenteditable keeps that caret container) — editor.value and the synced source element now return an empty string '' instead of <p><br></p>, which is what forms usually expect on submit. Real content (including a <p><br></p> followed by other blocks) is never collapsed. Addresses #1149.

🐛 Bug Fix

  • Font select button: with the font control rendered as a select (controls: { font: { component: 'select' } }), unstyled text showed the editor's raw default font stack (e.g. -apple-system) on the button instead of Default. The font control's value now returns an empty value when the computed font-family equals the editor's own default, so the button shows the Default list entry. Fixes #1370.

Don't miss a new jodit release

NewReleases is sending notifications on new releases.