Repository navigation
v54.0.0-beta.12 (2026-12-01)
Pre-release@platejs/cli
Published @platejs/cli@54.0.0-beta.12.
@platejs/test
Patch Changes
-
e02d156by @zbeyens – Remove@platejs/test/proof,@platejs/test/browser,openExampleWithOptions,defineBrowserFeatureContract, andcreateBrowserFeatureContractRegistry, and exportPlaceholderShapefrom@platejs/test/playwright.Migration: Call
openExample(page, name, options)from@platejs/test/playwrightinstead ofopenExampleWithOptions, and import test utilities from@platejs/test,@platejs/test/react, or@platejs/test/playwright.
platejs
Minor Changes
-
af255ebby @zbeyens – Enable remote sync server ink agents, richerplatejs/aiink/comment tools, SVG-first WebMCP outputs, and automatic ink restore on suggestion rejection:- Add
ink?: booleantoSyncServerAgentOptions(createSyncServerAgent), exposing synchronous single-revision<prefix>_read_ink(withsvg,clusters,suggestions, andblockRevisions) and<prefix>_set_ink_digitizedundersuggestandeditgrants. - Widen
<prefix>_read_inkwithauthor,roundId, andincludePriorfilters, attachclusters,priorMarkIds, leaf-levelsuggestions, and pure-JSsvgtoEditorInkPassage, and returncode: 'denied'whenBaseInkPluginis not installed. - Widen
<prefix>_set_ink_digitizedwithroundId,changeIds, andthreadIdsstored inInkDigitizedMeta, and automatically restore digitized ink when a mounted ink agent observes all linkedchangeIdsrejected and no linkedthreadIdsremain. - Widen
<prefix>_commentwithkind?: 'answer' | 'note' | 'question'(explicitkindwins overquestion's'answer'default) and surfaceCommentInvalidReasonon invalid comment mutations. - Strip raw base64 PNG data URLs from WebMCP
<prefix>_read_inktool results inregisterEditorTools.
- Add
Patch Changes
-
- Add
BaseDetailsPlugin.update.toggle(), returnbooleanatomically fromwrapandunwrapwith schema and lock pre-checks, and deferreveal,insert, andwrapview-store opens until transaction end without leaking guards or mutating duringeditor.candry runs. - Forward
callout.variantthrough DOCX export and addDocxCalloutVariantStyle(DocxExportStyles['callout']['variants']) for neutral caller-supplied callout variant shading and left accent borders.
- Add
-
- Validate
lossPolicyand parselimitsupfront before plugin compilation, browser DOM lookup, projection, or document assertion across HTML and Markdown serializers, parsers, andparsePlaceholders - Accept
EditorViewinstances inexportDocxalongside rootEditorinstances - Project editor state during
editor.api.markdown.serialize()so serializer callbacks observe the requested document and authored projection - Enforce
maxByteson untrimmed input ineditor.api.markdown.parseInline()and inlineeditor.api.markdown.stream(), and validate both preview and final inline output against the editor schema (markdown-schema-invalid) - Avoid false
named-rootomission warnings whenexportDocxreuses an exact retained DOCX source - Unwrap malformed navigation URLs and trim link URLs before custom link decoders run during
importDocx - Compare Markdown default property values structurally in property-omission diagnostics
- Validate
-
31ff880by @zbeyens – Removeplatejs/excalidrawandplatejs/excalidraw/reactin favor ofplatejs/board, and convert legacy v53excalidrawdrawings inmigrateV54- Remove the
platejs/excalidrawandplatejs/excalidraw/reactentrypoints, the@excalidraw/excalidrawoptional peer dependency, andPLUGINS.excalidraw(replaced byPLUGINS.board). - Convert legacy v53
excalidrawelements on a best-effort basis toboardblocks with an exclusiveshapescontent root insidemigrateV54whenever the target schema installsBaseBoardPluginand does not declare a customexcalidrawelement (rotation angles, unsupported element types such as embeds/iframes, and schema-rejected image URLs such as SVG data URLs are dropped).
Migration: Replace
platejs/excalidrawandplatejs/excalidraw/reactwithplatejs/boardandplatejs/board/react, and runmigrateDocumentwithmigrateV54on stored v53 documents. Apps that keep Excalidraw's file format can define a customexcalidrawvoid element plugin, whichmigrateV54leaves untouched. - Remove the
-
- Remove the optional
jszippeer dependency fromplatejs/docx/importso import-only apps load without installingjszip - Validate
lossPolicyandlimitsobjects consistently across HTML, Markdown, and DOCX import and serialization APIs - Order failed Markdown stream snapshots with errors before warnings, report canonical schema property keys on invalid aliased Markdown attributes, route DOCX footnote definition diagnostics through
lossPolicyandproperty-droppedaggregation, and fix Word HTML pastefontStyle, shaded-cell span wrapping, and RTF hex decoding
- Remove the optional
-
- Fix plain-text paste dropping leading and trailing spaces when
MarkdownPluginis installed, preserving active marks and inline containment for single-line plain text and keeping edge spaces on Markdown-parsed paragraphs.
- Fix plain-text paste dropping leading and trailing spaces when
-
- Remove
CreateCommentThreadInput.withHistory,resolveCommentChangeTarget,ResolvedCommentChangeTarget, andBaseCommentsPlugin.api.encodeAnchorfromplatejs/comments. - Replace
BaseCommentsPlugin.api.encodeAnchor(range)with statelessencodeCommentAnchor(editor, range)fromplatejs/comments, returningnullwhen destroyed, cross-root, invalid, or empty. - Resolve
{ type: 'change' }targets directly inapi.attachment(id)withstatus('pending' | 'accepted' | 'rejected' | 'contested' | 'deleted' | 'unavailable'),activeChangeId,groupId,ranges, andlocations(clearing stored coordinates under authored preview). - Enforce
documentandpropose-onlyview write and composer confinement on comment mutations,applyRemote, anddiscardOrphan. - Fix collapsed live anchor preservation with Tier-1/2 remote recovery, Redo local-undo tombstone and anchor persistence,
settledMutationIdsversion upgrades, collaboration snapshot block-deletion handling, andactiveStorespresentation cleanup. - Eliminate per-thread metadata serialization and cloning in
useCommentThreadIndex. - Fix DOCX comment import empty-root author and date promotion without phantom users and guard
getStoredDocxCommentEditorondocumentviews.
- Remove
-
27232f2by @felixfeng33 –- Fix typing over a DOM selection spanning multiple table cells throwing
RangeErrorin Editing and Suggesting modes, and prevent multi-cell text inserts from clearing read-only cells or clobbering unrelated explicit targets.
- Fix typing over a DOM selection spanning multiple table cells throwing
-
- Resolve Shadow DOM targets via
event.composedPath()inNodeSelectionkeydown and pointer-end listeners so arrow navigation andlostpointercapturework inside aShadowRoot. - Route
NodeSelectionarrow selection updates throughsetShownSelectionAsViewso authored preview views lift projected paths to stored targets.
- Resolve Shadow DOM targets via
-
- Fix table
Backspaceafter a table with a node-selected empty paragraph and route tableNodeSelectionreads directly throughstate.selection.value() - Fix Shadow DOM and nested-editor pointer and right-click containment in
NodeSelection - Remove internal
EditorTargetRuntimeandTargetFreshnessRequestre-exports from root barrels
- Fix table
-
- Re-export
SyncConnectedPeerfromplatejs/sync/serverandSyncTokenResultfromplatejs/sync.
- Re-export
-
9c0cbe6by @zbeyens – Hardenplatejs/aiandplatejs/ai/reactagent tools, pagination, and lifecycle- Remove
createAIDraftSessionand its draft-session types fromplatejs/aiand re-exportAIPlugin's draft types (AIDraftActionResult,AIDraftCommentMatch,AIDraftMode,AIDraftSnapshot,AIDraftTableCellRecord,AIPluginStatus) fromplatejs/ai/react. - Return
nextCursor: string | nullfromeditor_list_suggestionsandeditor_list_comments, return the created message ID ascommentIdineditor_comment, and mapblock-locked/node-write-vetoupdate refusals to'locked'ineditor_suggest_editandeditor_set_ink_digitized. - Reject invalid or mismatched
editorIdinputs on unnamed agents before callingallowinregisterEditorToolsandcreateEditorAgent. - Revive
useEditorAgentin layout effect on React StrictMode remounts and apply runtimedebounceDelaychanges inCopilotPlugin.
- Remove
-
46d35ccby @felixfeng33 – Promote AI agents to first-class collaborative authors inplatejs/aiandplatejs/ai/react: unifyeditor_suggest_editintoeditor_editwith decoupledaccess: 'suggest' | 'edit', enforce an unconditional'suggest'ceiling across WebMCP contexts, publish anchor-mapped live agent presence (presence,setPresence,subscribePresence,useEditorAgentPresence,useEditorAgentCaretGeometry), and wirecreateSyncServerAgenttoserver.setPresenceleases. -
16c6afcby @zbeyens – Re-exportAuthoredGroupQueryand expose place-scopeddecide({ action, at, authorId? }), optionalread.groups(query?), andread.changes({ kind })onplatejs/authored. -
bc54649by @zbeyens – Re-exportSyncRoomEvent,SyncBroadcastMatch,SYNC_MAX_EVENT_BYTES,SyncPresenceMeta, andSYNC_MAX_PRESENCE_META_BYTESfromplatejs/syncandplatejs/sync/server. UpgradecreateAIDraftSessionto per-block revision anchoring, atomic single-commitwithdraw + proposereplacement, and direct refusal handling. -
- Remove
clearSyncCache,SyncPersistenceMode,SyncPluginOptions.persistence, andSyncStatus.saveFailedfromplatejs/sync, renameSyncApi.resetOutbox()torecover(), and removeremoteCursorDecorationfromplatejs/sync/react - Add view-bound
useSyncApi()andAnyEditor | nullsafety acrossplatejs/sync/reacthooks, exposeSyncStatus.decide, re-exportSyncPresenceMetaandSYNC_MAX_PRESENCE_META_BYTESfromplatejs/sync/server, and support synced-room conditional-headapplyDiff()viaplatejs/diff
- Remove
-
- Add
reason: CommentInvalidReasonto{ status: 'invalid' }results returned byBaseCommentsPluginmutations, and return{ status: 'stale' }for calls against a destroyed editor. - Move
resolveCommentChangeTarget,CommentChangeTargetStatus, andResolvedCommentChangeTargetfromplatejs/comments/reacttoplatejs/comments. - Add
fromDocxCommentstoplatejs/docx/importandtoDocxCommentstoplatejs/docx/exportto map Word comments to and fromBaseCommentsPluginwith exact source reuse, reopened-comment export, and pending suggestion-comment export.
- Add
-
- Hydrate unresolved comment anchors via quote verification and re-verify touched live comment anchors on
'collaboration-snapshot'sync commits inBaseCommentsPlugin.
- Hydrate unresolved comment anchors via quote verification and re-verify touched live comment anchors on
-
122ae04by @felixfeng33 – Re-export three-waymerge()andMergeConflict/MergeResolution/MergeResulttypes fromplatejs/diff. -
76ae983by @felixfeng33 – Re-exportprepareDiff,applyDiff, andcompare({ identity: 'authoritative' })fromplatejs/difffor checked selective direct application without suggestions. -
b2a6d3fby @felixfeng33 – Addpresentation,fragment, andinertRemoteMediaprops toEditorStaticandEditorPreviewinplatejs/static, allowing live editors to render static previews and block fragments without schema drift while keeping remote media inert, and reject those reserved keys onrenderStaticHtmlprops. -
- Fix
normalize.removeEmptydeleting elements that contain inline voids, atoms, objects, or content roots, and skip removal on locked or read-only nodes - Delegate
insertBreakon locked or read-only blocks fromOverridePluginsoBaseLockPlugincan insert an escape paragraph cleanly - Fix
AffinityPlugintrapping arrow-key movement at block boundaries on single-markhard-affinity text and leaking metadata text properties such asauthoredinto pending marks - Prevent plugin keyboard shortcuts and
editOnlyDOM handlers from running or throwing inAuthoredPluginpreview views - Pass a root-scoped editor to
BlockPlaceholderPluginquerycallbacks inside named content roots
- Fix
-
e02d156by @zbeyens – ExportBrowserHandleReadfromplatejs/testingfor typed read access to the browser handle attached underBROWSER_HANDLE_KEY. -
- Add
ink-rounds(submitRound,read.round,read.rounds) withownerField: 'author'onink-marksandink-roundsplus clientread.canRemoveMarkfiltering - Widen
setDigitizedto store structuredInkDigitizedMeta(read.digitized) and enrichInkPassagewith spatialclustersand{ author, kind, roundId?, shape }onInkPassageMark - Export pure-JS zero-DOM
renderInkPassageSvgfromplatejs/ink
- Add
-
- Preserve bare URL serialization and incremental Markdown streaming fast paths in minified production bundles.
- Parse GitHub-style same-line
<details><summary>...</summary>openers with their body and closing tag cleanly, and report loss instead of silently dropping void/media blocks inside<summary>. - Round-trip GFM table column alignment (
:---,:---:,---:) viatextAlignwhenBaseTextAlignPluginis installed, and reportmarkdown-property-omittedwhen the schema cannot store it. - Strip leading BOM and align diagnostic source offsets in
editor.api.markdown.parseInlineand inline streams, and preserve leading/trailing spaces on plain-text paste surrounded by blank lines.
-
- Simplify
MarkdownStream: removeMarkdownStreamDelta,revision,baseRevision,stableCount,done, optionalslice?, andstream.snapshot; narrowMarkdownStreamSnapshotto a discriminated union (ok: truewith frozennodesand warning diagnostics,ok: falsewith error-first diagnostics and nonodes); returnMarkdownSliceParseResultdirectly fromstream.finish().- Migration: check
snapshot.okbefore readingsnapshot.nodes, readfinal.slice.contentfromstream.finish()whenfinal.ok, and reconcile live previews from frozen===object identity on committed blocks and table rows instead ofsnapshot.deltaorsnapshot.revision.
- Migration: check
- Fix
MarkdownStreaminline-mode BOM/whitespace handling and surfacestream.finish()parse errors increateAIDraftSession.
- Simplify
-
- Refuse combining legacy
suggestion_*marks with native node.authoredmarks orauthored-*document record sets inmigrateV54instead of silently overwriting native marks. - Preserve
fill.*element IDs whenmigrateDocumentvalidates an already-current envelope with no migration steps or comment anchor/range mappings, restoring strict idempotency forplate migrate run --check.
- Refuse combining legacy
-
- Export
Editoras an interface onplatejsandplatejs/reactand inline internal return aliases ontoReactPluginand.extend()so consumer.d.tsfiles emit withoutTS2883errors - Preserve base plugin
dependenciesintoReactPlugin(replacing same-family entries with React descriptors and appending new dependencies), freeze returned descriptors, and throw when passing adapter options to a configured base plugin - Keep
TransferPluginrequired in ReactcreateEditor(onlyHistoryPluginandAffinityPluginare optional on React) - Remove
applyDeepToNodes,ApplyDeepToNodesOptions,defaultsDeepToNodes,mergeDeepToNodes, andPluginNamefromplatejs
- Export
-
1afc3a5by @felixfeng33 – Pin the current user's own suggestions to palette slot 0 and map other authors to slots 1 through 6 viasuggestionColorOf(authorId, { userId }) -
8639d6eby @zbeyens – Remove duplicateeditor.plugin(UploadPlugin).api.accept(kind)in favor ofeditor.plugin(UploadPlugin).store.get('accept', kind)(andusePluginStore(UploadPlugin, 'accept', kind)in React). Reject pending-deleted drafts inadmit().fill()andsubmit({ slot }), and fix the.odtfallback MIME mapping toapplication/vnd.oasis.opendocument.text. -
e7096b5by @zbeyens – Report lossy diagnostics throughonPasteResultwhen HTML, Markdown, or exact table pastes crop onto a smaller multi-cell selection, and trim ragged pasted tables to the selection bounds before padding.
plitejs
Patch Changes
-
87fa537by @zbeyens – Keep authored completion spares across partial decisions in containers whose minimum child count exceeds their default slot count -
e7096b5by @zbeyens – Flatten rich slices on copy-drags intoslice.plainTextblocks consistently with paste, and block native read-only cut defaults even whenclipboardDatais absent. -
- Keep pointer caret placement on the clicked text when a sibling inline span on the same line is taller (such as a comment-decorated link, superscript, or subscript)
-
9ae8d9aby @felixfeng33 – Fixeditor.api.dom.scrollIntoViewto reveal targets in outer scrollable ancestors and the window when a registered scroll container sits outside the viewport, while keeping smooth-scroll displacement clamped to each container's bounds. -
- Keep scoped-view
tx.selection.setNodescalls in the active view root even after an earlier transaction step moved selection to another root. - Require matching endpoint roots across stateless range, selection, anchor, and
unhangRangeboundaries so mixed-root ranges fail loudly instead of mutating the wrong root. - Normalize endpoint roots in
setSelectionand whole-block landings, preserveSpaninputs instripLocationRoots, and compare aliased roots against live target roots during block drops from proposed previews.
- Keep scoped-view
-
- Validate, copy, and freeze
SelectionApi.textoutput symmetrically withSelectionApi.nodes - Tighten
LocationApi.{isPath,isPoint,isRange},PathApi.isPath,PointApi.isPoint, andRangeApi.isRangeto reject sparse arrays, malformed indices/offsets,Spanpassed asPath, and cross-root ranges - Exclude
NodeSelectionfromuseElementSelected({ mode: 'collapsed' }) - Prevent
NodeSelectionreplacement, deletion, and cut from removing or shifting grid cells out of rows - Fix Shadow DOM probe latch recovery, refused parked-export recording, named-root anchor/unhang handling, and move internal
EditorTargetRuntime/TargetFreshnessRequesttypes from the root barrel toplitejs/internal
- Validate, copy, and freeze
-
- Add
SyncServer.listPeers(room)and optional/predicateSyncServer.disconnect(room, match?)so hosts can enumerate connected peers and refresh or revoke all grants across Cloudflare Durable Object hibernation. - Support
{ stop: 'auth' | 'room' }(SyncTokenResult) fromwebSocketTransporttoken()callbacks to halt reconnects with terminalstoppedReasoninstead of retrying permanent access loss. - Coalesce contiguous offline edits into one
SyncKeptItemcard on read-only downgrade, outbox reset, or snapshot catch-up instead of creating one kept item per keystroke.
- Add
-
46d35ccby @felixfeng33 – Add non-socket versioned server presence leases (server.setPresence), per-actorSyncGrant.delegatedActorsaccess policies (SyncDelegatedActor), Cloudflare Durable Objectsync_presence_leasespersistence, non-AuthoredPlugindelegated plain-edit routing, and exactepoch/versionmetadata on read-onlyserver.runresults. -
16c6afcby @zbeyens – Add{ action, at, authorId? }range/node decisions toAuthoredDecision, optional{ at?, authorId? }filtering toread.authored.groups(), andkindfiltering toread.authored.changes(). -
- Fix wire-deserialized v4
DocumentChange.fromJSONcompoundwithdraw + proposesync admission when withdrawing a structural wrap (at head and across remote gaps) - Mint causal
authored-eventsfor explicittx.authored.propose(...)andapi.authored.proposeComparison(...)calls - Refuse duplicate
tx.authored.propose(...)calls in the same update and capauthored-metadataat 16 KiB UTF-8 with no own__proto__keys - Reuse unchanged named roots and keep live-preview
nodes.byId/nodes.byUniquedirectory updates O(changed named roots) - Forward post-mount
view.api.authored.setView(...)updates into uncontrolled<EditorRoot editor={view}>
- Fix wire-deserialized v4
-
bc54649by @zbeyens – Add one-way server room broadcast events (server.broadcast,sync.subscribeEvent,SYNC_MAX_EVENT_BYTES) and the'collaboration-snapshot'canonical update tag on true sync snapshot installs. Add boundedp:presence metadata (sync.setPresenceMeta,SyncRemoteCursor.meta,SYNC_MAX_PRESENCE_META_BYTES = 256) with bidirectionalprojectReadmasking and view-keyed indexed cursor decorations. BumpSYNC_RULESto11with compoundwithdraw + proposegap admission across client and server, own-actor delegated withdrawal verdicts, narrowed element format-mark staleness checks, container-aware take-back checks, andsuggest-grant admission for property mutations on an author's own innermost pending insertions (including upload completion). -
- Switch
plitejs/syncto online-first in-memory reconnect buffering with a browserbeforeunloadwarning whenunsent > 0; removeclearSyncCache,SyncPersistenceMode,SyncPluginOptions.persistence, andSyncStatus.saveFailed, and renameSyncApi.resetOutbox()torecover() - Enforce
SyncGrantcontinuously across read-only state (core/view-state),AuthoredPluginSuggesting clamping,SyncStatus.decide, livedelegatedActorsrevocation, and fail-closedserver.broadcast()underprojectRead - Add conditional-head CAS to synced
applyDiff()(prepareDiff({ editor })/merge({ editor })) andserver.run()/server.update()({ ifHead }), add'suggest'recovery toSyncApi.decide(), add view-bounduseSyncApi()toplitejs/sync/react, widenloopbackTransporttokentoSyncTokenResult, and re-export presence metadata types fromplitejs/sync/server - Fix nested human/delegated suggestions mixing actors in
commitAuthoredActors, in-flight batch stalling afteredit -> read -> editgrant transitions, and stale kept cards remaining after retried entries settle
- Switch
-
04d0e75by @zbeyens – ExportSchemaPluginfromplitejs, return it fromdefineEditorSchema, and defaultEditorCommandto the core editor without referencing internal types in generated consumer.d.tsfiles. -
122ae04by @felixfeng33 – Add pure stateless three-waymerge()andMergeConflict/MergeResolution/MergeResulttypes toplitejs/diff. -
76ae983by @felixfeng33 – AddprepareDiff,applyDiff, andcompare({ identity: 'authoritative' })toplitejs/difffor checked selective direct application without suggestions. -
5f2895dby @zbeyens – Preserve matched element IDs, native V4move_nodesteps, and live anchor mapping across ID-stripped and cross-editor (shifted, differing, asymmetric, or partial element ID) document comparisons, authored imports, and undo; fix shifted mark-boundary tracking in containers and inline-bearing blocks; bound matcher split/join and word-move work on large edits; and improve structural matching for moved items, renumbered lists, short paragraphs, cross-moved sections, and moved table columns. -
bd9256fby @zbeyens – Fix shared content-root loss checks on block copies, enforce non-writable block and file transfer guards uniformly, fix RTL horizontal drop edge and indicator geometry, and guard inline-void drag starts without adjacent text siblings. -
e02d156by @zbeyens – ExportBrowserHandleReadfromplitejs/testingfor typed read access to the browser handle attached underBROWSER_HANDLE_KEY. -
2de2c33by @zbeyens – Allow built-in keyboard actions to run when anonKeyDownhandler callsevent.stopPropagation()withoutevent.preventDefault()or returningtrue -
- Fix leaked keyboard and pointer listeners and stale press state on unmount or root swap during Shift selection extension and read-only presses
- Fix Shadow DOM selection lookup and
getComposedRangesunwrapping ineditor.api.dom.resolveVisualPointand multi-editor Shadow DOMselectionchangerouting - Ignore cross-realm form input
selectionchangeevents inside mounted editors
-
a705114by @felixfeng33 – RouteDOMEditor.textToCaret,DOMEditor.resolveRange,isSelectableDOMSelection, andreact/editable/selection readers through Shadow DOMgetComposedRanges, fix Android zero-width span cleanup (textContent), clearactiveSelectionExportand advancesyncSelectionRepairIdon root swap/unmount, and collapse duplicate keydown classification into single-passresolveEditableKeyDownClassification. -
- Reject malformed
records['shared-state']entries (missing/extra keys, emptywriteId, or non-JSONencoded) fail-closed acrosscreateEditor,schema.assertDocument,schema.fitDocument, andtx.value.replace. - Remove legacy pre-release v1-v4 node selection decoders from history selection decoding and zero-pad
fingerprintEditorJsonoutput halves to fixed width.
- Reject malformed
-
- Add
SchemaRecordSet.ownerFieldto enforce per-author record ownership underaccess: 'suggest'grants - Protect
namedByrecord sets underaccess: 'suggest'(put-if-absent and drop only when unreferenced) and refuseset_registerwrites to owned ornamedBysets - Allow
propose-onlyviews to writesuggestWritablerecord sets
- Add
-
- Fix v4 replay container validation to check the post-rebase document instead of the pre-rebase base, and reject
set_propssteps that mutate reserved elementidproperties during v4 step validation - Enforce consistent created element ID collision checks across scoped and
computeAfter: falsev4 rebases, and replace ID-changed elements with balanced element replacements underpreserveElementIds
- Fix v4 replay container validation to check the post-rebase document instead of the pre-rebase base, and reject
Full changelog: v54.0.0-beta.11...v54.0.0-beta.12