github udecode/plate v54.0.0-beta.3
v54.0.0-beta.3 (2026-11-23)

pre-releaseone hour ago

@platejs/cli

Published @platejs/cli@54.0.0-beta.3.

@platejs/test

Published @platejs/test@54.0.0-beta.3.

platejs

Patch Changes

  • 24651f9 by @zbeyens –

    • Fix Backspace or Delete that empties a heading turning it into a paragraph. The empty heading stays, and the next Backspace turns it into a paragraph.
    • Fix Turn into Quote, the blockquote shortcut and editor.plugin(BlockquotePlugin).update.wrap() putting each selected block in its own blockquote. Adjacent selected blocks now share one blockquote.
  • c28d5ad by @zbeyens –

    • Fix the AI menu's first edit suggestion replacing the old selected text, and leaving stray characters, when you typed inside the selection after sending the request
  • 5716f93 by @zbeyens –

    • Keep AIChatPlugin's preview and pending proposal when a transaction guard refuses its write. accept, insertBelow and replaceSelection close the session only once their write commits.
    • Return { status: 'invalid' } from hide, reset, show, submit and reload, and keep the session, when a guard refuses discarding the pending proposal.
    • Keep a streamed proposal when a guard refuses a chunk, and add the next chunk to the same undo step.
  • 0fe05e3 by @zbeyens –

    • Paste text or a link onto a focused board to add it as a selected note at the pointer, or at the view's center when the pointer is off the board. One undo removes it.
    • Paste or drop picture files onto a board to upload them as image shapes, in a row centered on the pointer or the drop point.
    • Upload the file of a picture copied from a web page when its link does not load, so the picture still lands on the board.
    • Add upload(files) to useBoardActions() to upload picture files, such as ones from a toolbar's file picker. Read takesPictureFiles through useBoardView to disable that button on a board that takes no picture files.
    • Add fitsAfter(key) to the upload plugin's API to ask whether another file's placeholder fits after an upload placeholder, such as before a file picker opens for several files.
  • 75b505a by @zbeyens –

    • Fix board pen lines, geo shapes and notes whose type an app renames through schema.override. They now draw, erase, take the toolbar's styles and get announced like shapes of the default type.
  • 83517ee by @zbeyens –

    • Add read.board.strokePath(id), which returns the SVG path a board draws for a pen line, or null when id names no pen line. It needs no mounted board.
    • Move BoardStrokePath from platejs/board/react to platejs/board. Import it from platejs/board.
  • 972c50f by @zbeyens –

    • Add a caret plugin slot, rendered after the Editable, for UI that follows the caret. Inside it, useEditor() and the editableRef prop answer for the view that holds the caret, such as a board note, so a floating toolbar in this slot follows the caret into the note.
    • Remove EditorSelectionView and the useSelectionView hook from platejs/react.

    Migration: Drop the <EditorSelectionView> wrapper. Move UI that used it inside an editing area, such as a floating toolbar, from afterEditable to the caret slot:

    const FloatingToolbarPlugin = definePlugin('floatingToolbar', {
      slots: { caret: () => <FloatingToolbar /> },
    });
  • f7fa388 by @zbeyens –

    • Keep a code fence's info string after its language, such as title="a.ts" {3-5}, as the code block's meta through Markdown and HTML import and export
  • eff0999 by @zbeyens –

    • Fix a CodeMirror code block dropping the next keystroke, paste, cut or drop when the editor resets its text during an input method composition, such as after a refused edit or a collaborator's change.
    • Keep a CodeMirror code block's caret where the editor puts it when the editor resets its text.
    • Fix a CodeMirror code block turning into a paragraph in WebKit browsers when an input method empties it.
  • 9d460d1 by @zbeyens –

    • Fix Enter in the empty last body line of an open Details moving the caret into the block after it. Enter now adds an empty paragraph right after the Details and puts the caret there.
  • 8883a26 by @zbeyens –

    • Report condition-loop on each field of a loop of conditions, such as A naming B while B names A, and refuse an update whose condition would close one.
    • Refuse a fieldId in the settings of insert or the patch of update.
    • Check a condition that names its own field against the kind the same update sets.
    • List the page's fields in read.fields() from a board note's view, in reading order.
  • 839996e by @zbeyens –

    • Add fillRole to BaseFieldPlugin's state. While it is set, the editor refuses every local change except a fitting or cleared value on that role's fields, and undo or redo returns blocked at a step that changed anything else.
    • Start a new undo step when a field write's role differs from the step before it, so a fill never shares an undo step with an author's edit.
    • Refuse the whole update instead of throwing when, while a fill role is set, update names a field that no longer exists or a value that no longer fits it.
  • 5c0aff5 by @zbeyens – Add editor.plugin(BaseHeadingPlugin).read.canSetLevel(level), which answers whether setLevel(level) can apply to every selected block. A menu can disable a heading level the caret's parent cannot hold.

  • 868638a by @zbeyens – Fix a hydration mismatch in a control that reads useEditorFocused() and hydrates after its editor took focus, such as a toolbar behind Suspense beside an EditorContent with autoFocus

  • 7a0e402 by @zbeyens – Replace InkLayer with InkContent, which mounts as the ink plugin's wrapContent slot. In development, it throws when anything sits between the Editable and the ink layer, such as a toolbar the layer would cover.

    Migration: Replace the wrapContent slot that rendered <InkLayer sign={Sign} /> after its children with wrapContent: (props) => <InkContent {...props} sign={Sign} />.

  • 405fd82 by @zbeyens – Keep a pen mark's sign where its block stood when the block is deleted while the mark is being drawn, here or by a collaborator, however many other edits come before the mark saves

  • 0938c3d by @zbeyens – Save pen marks in a packed format about half the size. Marks saved by 54.0.0-beta.2 still read, but an app still on 54.0.0-beta.2 shows none of the marks this version saves

  • dffae16 by @zbeyens – Fix ink marks left off their words after a style change moves the words without resizing the paragraph. Marks now place again a quarter second after the last edit, layout change or scroll

  • 7bc3175 by @zbeyens – Speed up typing, drawing, scrolling and deleting many marked blocks in documents with many ink marks. read.marks() keeps each unchanged mark's object between reads.

  • 6d7c412 by @zbeyens – Leave out the ink paragraph snapshots no mark points at when an editor opens a saved document, so a removed mark's words leave the file at its next save. Snapshots saved by 54.0.0-beta.2 stay, so an app still on beta.2 can undo back to its own marks.

  • 78987a9 by @zbeyens –

    • Keep a Markdown file's leading YAML or TOML front matter. editor.api.markdown.parse stores it at meta['markdown.frontmatter'] instead of reading it as a rule and a heading, serialize writes it back first, and getMarkdownFrontmatter from platejs/markdown reads it
    • Fail serialize under the reject policy with markdown-frontmatter-omitted when it cannot write the stored front matter back. Under lossPolicy: 'allow' it writes the file without the block and warns
    • Start a serialized file with a line ending when its body would otherwise read back as front matter, such as two --- rules
  • 2ad50b0 by @zbeyens –

    • Style an unclosed bold, italic or strikethrough run in a partial parse, parseSlice or parseInline preview as it will read once it closes, and hide up to three trailing *, _, ~ or \ characters until the next chunk decides them. A later chunk can take back styling a preview showed
  • 824887f by @zbeyens –

    • Fix Markdown that read back differently after a save: code spans with line endings or edge spaces, emphasis around a link, nested emphasis, a bare URL right after text and an empty list item before a nested ordered list
    • Fix streamed Markdown parses that missed a link definition inside a quote or a list item
  • a1af219 by @zbeyens –

    • Fix parseSlice with previous returning a different preview than a fresh parse for streamed Markdown that holds, among others, no-break spaces in a blank line, a math block opened with more than two dollars, a link definition with an escaped bracket, a byte order mark or a lone CR line ending
  • 9fc3e9a by @zbeyens –

    • Make useEditor() outside every editing area of an EditorRoot, such as in a fixed toolbar, return the editor of the root that holds the caret. A toolbar command such as editor.plugin(BoldPlugin).update.toggle() then changes a board's note while the caret is in it. With nothing selected it returns the editor of the primary root. useEditorSelector, useEditorReadOnly, useEditorFocused and the other hooks that read that editor follow it too, and a component whose selected value stays equal no longer renders when the caret moves.
    • Make useEditorHistory() with no editor or root undo and redo the editor useEditor() returns. It no longer needs an EditorRoot around it.
    • Make useModelEditor() under EditorController return the document editor of the EditorRoot used last, where it threw.

    Migration: A lock set through the editor that useEditor() returns outside every editing area refuses the commands sent through that editor and no longer locks an EditorContent. To lock one EditorContent, call useEditor() inside its EditorContainer:

    function Lock() {
      const editor = useEditor();
    
      return (
        <button onClick={() => setEditorReadOnly(editor, true)}>Lock</button>
      );
    }
    
    <EditorRoot editor={editor}>
      <EditorContainer>
        <Lock />
        <EditorContent />
      </EditorContainer>
    </EditorRoot>;
  • 038a7bc by @zbeyens – Give each tile of a table paste, and each cell of a table fill, its own copy of an element another element references, such as a field. Each copy gets a new id, and each copied reference names the copy in its own tile or cell.

  • 9b218c9 by @zbeyens –

    • Add admit and fill to the upload plugin's update API. A plugin with its own insert, such as one that wraps each file's placeholder in a container, checks a batch with admit, inserts the placeholders it returns and gives each file its placeholder with fill.
  • 0db21cf by @zbeyens –

    • Report an unsupported file type first when a file of another kind is picked for an upload placeholder, before the size and configuration checks.
    • Fix an upload placeholder's submit sending its file twice, losing it or sending an older file when its transaction spec replays, another commit or a Cancel comes first, or a newer submit overtakes it.

plitejs

Patch Changes

  • cccbe29 by @zbeyens – Fix Next.js production builds with Turbopack's default scope hoisting, where a page with an editor failed to prerender with Editor read registrations must be created by the plugin read factory. Apps no longer need experimental.turbopackScopeHoisting: false.

  • 18448e7 by @zbeyens – Fix a delete into a code block turning all of its lines into text of the block before it. Delete at the end of the block before joins only the first code line, and the code block keeps its other lines and its language. A range delete that covers the whole block before removes that block and keeps the code block whole.

  • 18448e7 by @zbeyens – Fix a click right of a code line putting the caret at another line's end or at the block's start. A click past a line's end now puts the caret at that line's end, and a click on an empty line puts it on that line.

  • 44ce4cb by @zbeyens – Fix Backspace and Delete next to mentions, inline voids and inlines a caret may not stop in

    • Word Backspace and word Delete count a mention or another inline void as one word, and remove only that atom with the spaces between it and the caret.
    • Backspace and Delete inside or at the edge of a writable inline with selectable: false remove one character, as they do in a link.
    • Delete that stops before a read-only inline leaves the caret before it, so the next Delete removes it and typing works.
    • Backspace and Delete beside a block with selectable: false remove it whole even when it holds a mention.
  • 77ca905 by @zbeyens – Open closed content, such as a closed details, when a block drag rests on its block for 800 ms, so the drop can land inside. The content's onMaterialize callback runs with the new drag reason; ignore that reason to keep the content closed during a drag.

  • 1861fc4 by @zbeyens – Fix the range a paste or a transfer copy returns with the authored plugin in Editing, which started one character late when the pasted text joined the text before it.

  • eff0999 by @zbeyens –

    • Return stale from an external-text view's dispatch when the editor refuses the edit, such as one Suggesting cannot record, and reset the view to the editor's text.
    • Keep the undo boundary when the editor refuses an external-text edit, so the next edit after a composition gets its own undo step.
  • 7ca1ad5 by @zbeyens – Fix ArrowDown and ArrowUp in Firefox into a block that scrolls, such as a code block with overflow-x: auto, which put the caret at the end of the block instead of on its nearest line

  • 022a98b by @zbeyens – Run a plugin's update factory the first time an update or a correction reads its group, not at the start of every update, so updates that never read a group skip it

  • 0b0f932 by @zbeyens – Fix pasting blocks at a caret inside a link. A quote pasted in the middle of a link in a quoted paragraph no longer splits the quote in three, and blocks pasted at a link's start or end land just outside the link instead of joining into one line.

  • 8623edf by @zbeyens – Fix the caret after pasting a link right before another link, or an inline void such as a mention right before another inline void, so a typed letter lands between the two

  • d472a04 by @zbeyens – Fix the caret and selection in mixed content and around marked controls

    • Home and End stay on the text before or after a block nested in a text block.
    • After a command removes a text element's only text, a typed letter lands in that element.
    • A click after a double-click in decorated text, such as a lint underline, puts the caret at the clicked offset.
    • A read-only editor keeps its selection painted after a command that re-renders it, such as Add comment.
    • A triple-click selects only the clicked line in a code block or a block with line breaks, and only the clicked text beside a nested block.
    • A backward selection stays backward after typing over it and undoing.
    • The selection stays painted when focus moves to a marked control in Firefox or Safari.
  • 7ca1ad5 by @zbeyens – Fix Undo and Redo pressed in an independent editor nested in a void element, which ran the outer editor's history instead of its own

  • 674a565 by @zbeyens –

    • Fix a paste into a code block, or any element whose schema allows one text, being refused in Editing and in your own pending code block in Suggesting.
    • Fix a letter or newline typed in Editing at the start or end of a pending code block, or in an empty one, being refused. The text now joins the block's suggestion.
    • Fix a letter or paste in Editing being refused in a code block whose text holds another author's pending format, such as a color.
    • Refuse typing, Enter, paste, Backspace, Delete and mark toggles in a code block whose deletion is pending, in Suggesting and Editing, instead of landing the edit beside the block or in its struck text. The refusal reaches subscribeRefusals as unrepresentable. Decide the block's pending deletion first.
  • 60c44c5 by @zbeyens – Fix RangeGeometry.clipRect and visible for an Editable whose text paints outside its own box without clipping, such as a board's. A popup placed by useSelectionGeometry, such as the floating toolbar, now shows over that text, and useEditableClip cuts by the same area.

  • 16716a6 by @zbeyens – Give each pasted or duplicated element a new value for every unique property another property's references names, such as a field id, and point each copied reference at the copy. A reference whose target the paste or duplicate drops keeps naming the original.

  • 70560ee by @zbeyens – Fix a property write in the same update as a paste, a document replace or a content completion, such as a plugin completing a pasted field's id, which landed on another node or was lost when the authored plugin recorded the update

  • 94e8d60 by @zbeyens – Fix a closed quote pasted at a caret inside a quoted paragraph losing the text after the caret. A table pasted at a caret inside a table cell keeps the cell's text after the caret too.

  • 19995c7 by @zbeyens – Add namedBy to a schema record set, so a set declares which set's records point at its records through a names function that lists the ids a record points at.

    • An editor created on a saved value leaves out the records of that set that nothing points at and keep does not accept, so the next save drops them.
    • tx.history.restore stops undo or redo before a step whose replay would point a record at a missing one.
    • Undo and redo skip writes to a record set the current schema retains.
  • 02007e6 by @zbeyens – Open a document's saved records faster. Each record loads once as text and parses the first time something reads it. Records read back from editor.read.value() now always list their keys in sorted order, as records written after the open already did

  • 806ba41 by @zbeyens –

    • Return { reason, status: 'blocked' } from editor.api.history.undo() and redo() when the editor refuses the replay, instead of throwing, and pass it to the Editable's onHistoryReplay for a keyboard undo or redo. The step stays in history.
    • Fix history left busy after a session undo or redo, such as a comment thread restore.
    • Send an edit that a plugin makes in reaction to a remote Yjs import or another collaboration update to the other peers.
    • Fix the authored plugin's subscribeRefusals passing on refusals from other plugins, such as a node write veto.
  • 60c44c5 by @zbeyens – Remove useSelectionView from plitejs/react. Use useCaretEditor() for the editor of the root that holds the caret.

  • 67de7de by @zbeyens – Make useRootEditor() and useCaretEditor() return one editor per root under an EditorRoot, so a lock set through that editor holds after the caret leaves its root and comes back. A renderer inside an editing area, such as a shape on a board, gets an editor of its own, so a lock set from outside never reaches it. The editor's isFocused(), isComposing(), focus() and blur() act on the editing area that shows its root, and throw while none does.

  • 5c0aff5 by @zbeyens – Add editor.read.schema.canPlace(nodes, { at, replace, root }), which answers whether nodes can land at a slot, or take the place of the child there, under the rule tx.blocks.insert enforces. A menu can disable what the parent cannot hold.

  • b294cdf by @zbeyens – Fix selector hooks calling a custom equalityFn with null before the first result. equalityFn now takes (a: T, b: T) => boolean.

  • 24651f9 by @zbeyens – Fix tx.blocks.toggle(props, { wrap: true }) wrapping each selected block in its own wrapper. Adjacent selected blocks with the same parent now share one wrapper.

  • 97828f2 by @zbeyens –

    • Fix unique.holder in an authored preview or a projected document view returning the stored document's key and path, or nothing. A read that finds a node by a unique id, such as a board's read.board.shape, now works there.
  • 59aa10b by @zbeyens – Speed up typing in documents whose schema declares a unique property, such as block ids.

  • 25fc8f2 by @zbeyens – Make editor.plugin(Plugin) on a React view editor, such as the one useRootEditor() returns, return the same object on every call, so a hook that lists it as a dependency no longer runs again on each render.

  • 1946357 by @zbeyens – Let setEditorViewing() take the editor createEditor() returns instead of throwing. That editor has no Mode apart from its lock, so Viewing locks it and leaving Viewing unlocks it, as setEditorReadOnly() does.

  • 014d1c8 by @zbeyens – Fix selections across blocks a virtualized editor has not mounted, and arrow keys beside hidden content

    • A Shift-click or Shift+ArrowDown range that reaches unmounted blocks stays selected, and the next letter replaces it.
    • Undo that restores a range far above the viewport scrolls to it and shows it selected.
    • ArrowUp and ArrowDown after a click move into content an app hides, such as a collapsed accordion, instead of skipping past it.
  • faf5cc3 by @zbeyens –

    • Fix Backspace after a triple-click putting the caret at the end of the block above. The caret now starts the block that moves up.
    • Fix Backspace after a triple-click on the last block, a block next to a table or a table's only cell removing it. The block or cell now stays, empty, with the caret in it.
    • Fix Backspace over whole blocks selected as text replacing them with a paragraph. The first block stays, so a checklist item keeps its checkbox.
    • Fix typing over several whole blocks giving the new text the default block type. The text now takes the first block's type.
  • 70d5dc5 by @zbeyens –

    • Fix compare text changes to mark whole words instead of letters, so "like" to "love" is one change instead of "ik" to "ov"

Contributors

Thanks to everyone who contributed to this release:

@zbeyens

Full changelog: v54.0.0-beta.2...v54.0.0-beta.3

Don't miss a new plate release

NewReleases is sending notifications on new releases.