Skip to content

4.12.39

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Jul 08:16

πŸ› Bug Fix

  • Fullsize / global fullscreen: exiting fullsize scrolled the whole page back to the top. Entering global fullsize puts <html> into position: fixed, which makes the browser reset the page scroll to 0; that position was never restored on exit. The scroll offset is now saved when entering fullsize and restored with window.scrollTo() when leaving it. Fixes #1255.
  • Scroll into view / Search: inView (used by scrollIntoViewIfNeeded) only checked that an element wasn't below the viewport bottom, not that it wasn't above the top. An element scrolled above the visible area was therefore reported as visible, so navigating to it never scrolled β€” most visibly, cycling through search results and wrapping around to a match near the top of the page did not scroll up to it. inView now also requires the element's bottom to be at or below the viewport top. Fixes #1279.

πŸš€ New Feature

  • 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 / #1323.

  • 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.

    Jodit.make('#editor', { nonce: 'r4nd0m' });

πŸ“ Documentation

  • Getting started / CDN: bumped the pinned Jodit version in the cdnjs/unpkg snippets in README.md and docs/getting-started.md from the stale 4.7.6 to 4.12.37. Refs #1208.

🏠 Internal

  • Enter tests: added a regression test asserting that pressing Enter with the caret at the bottom of a scrollable editing area scrolls to follow the cursor (and does not scroll when the caret line is already visible). Covers the scenario from #1300, which works on the current version.