Skip to content

PhoenixKit 2.22.21: Leaf editor 0.8 with selectable chips

PhoenixKit 2.22.21 moves the Leaf text editor used across PhoenixKit to version 0.8.0.

Leaf 0.8 makes preserved tags behave as chips. A tag typed by hand turns into a chip when the cursor leaves the line. A chip can be selected with a click: Backspace deletes it, Enter starts a paragraph after it, and the arrow keys move out of it. Ctrl+Backspace and Ctrl+Delete delete whole words in source blocks. A wiki link can now be typed on a line that already holds a markdown link, and the heading button in the toolbar keeps its change after leaving the line.

PhoenixKit loads the editor’s browser part from a fixed version. The version requirement for Leaf’s Elixir part now stops below 0.9, so the two halves cannot drift apart when Leaf 0.9 is released. Nothing in a current lock file changes.

Full release notes: PhoenixKit 2.22.21

2.22.21 · 11 September 2026

Changed

  • Leaf pinned to 0.8.0 (#801) — mix.lock and the LEAF_CDN constant in priv/static/assets/phoenix_kit.js move together to leaf@v0.8.0, bringing the atomic-chip editing batch: hand-typed preserved tags chip when the cursor leaves the line, chips are click-selectable (Backspace deletes, Enter opens a paragraph after, arrows step the caret out), and Ctrl+Backspace/Ctrl+Delete word deletion works in hybrid source blocks. Riding along: a wiki link can be typed in a row that already holds a markdown link, and the toolbar heading button edits the source in hybrid mode so it survives leaving the line.

Fixed

  • The :leaf requirement now has the ceiling its comment always claimed. Every alternative was patch-less — and ~> 0.5 means >= 0.5.0 and < 1.0.0, not “the 0.5 line”, so that one alternative swallowed the whole 0.x range and made the or ~> 0.6 or ~> 0.7 or ~> 0.8 enumeration after it inert. This matters more than for an ordinary dep: core serves leaf’s browser half from an exact jsDelivr tag while Hex resolves the Elixir half, so an open ceiling let a host float the server half past the frozen bundle the day leaf 0.9 shipped — the silent cross-version editor the pin exists to prevent. The requirement is now ~> 0.4.1 or ~> 0.5.0 or ~> 0.6.0 or ~> 0.7.0 or ~> 0.8.0 (>= 0.4.1 and < 0.9.0); resolution is unchanged at leaf 0.8.0 and mix.lock did not move. leaf_bundle_pin_test.exs gained a test that rejects the next minor above the CDN pin, which the old floor-only check could never catch.

PhoenixKit 2.22.21. Install or update: {:phoenix_kit, "~> 2.22"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.