Repository navigation
v54.0.0-beta.11 (2026-11-30)
Pre-release@platejs/cli
Patch Changes
49d5e7aby @zbeyens – Mapplitejs/sync/postgresimports toplatejs/sync/postgresinplate codemod plite-to-plate
@platejs/test
Published @platejs/test@54.0.0-beta.11.
platejs
Patch Changes
-
- Replace
HorizontalRuleRules.markdown({ variant })with oneHorizontalRuleRules.markdown({ variants })rule defaulting to['-', '_', '*'](---,___,***). - Land the caret in an editable block after inserting or upserting a horizontal rule with
{ select: true }, keeping the divider selected when no writable block can follow. - Add
initialState.levelstoBaseHeadingPlugin(default[1, 2, 3, 4, 5, 6]), honored bycanSetLevel,insert,upsert,setLevel,toggle, andHeadingRules.markdown(), and fixtoggleto promote mixed selections before resetting. - Allow
BaseBlockquotePluginShift+Tab(untab) to lift direct non-code-block children such as headings, lift only direct quote children onShift+Tab, empty Enter, and Backspace at block start, rununtabat lower priority than code blocks, and returnbooleanfromwrapanduntabwith atomicwrappreflight.
Migration: Replace separate
HorizontalRuleRules.markdown({ variant })entries with one call:HorizontalRulePlugin.configure({ component: HrElement, inputRules: [HorizontalRuleRules.markdown()], });
- Replace
-
- Allow moving paragraphs inside and between board notes in
SyncPluginshared rooms while keeping whole-shape moves blocked. - Export
BoardShownStyleandBoardShownStylesfromplatejs/board/react. - Remove inline paint from
[data-board-select-box]and[data-board-frame-preview]previews and derive unreadable-image placeholder and transparent-canvas export colors from the host theme. - Validate positive finite
heightonBaseBoardPlugin(reporting invaliddata-editor-html-board-heightattributes on HTML decode) and 3-tuple finite points onBaseBoardStrokePlugin. - Fix multi-board
restack, named-root paste into an empty board, locked-shapeCutclipboard preflight, extreme-zoom ellipse outlines, and single-writerBoardShapecursor/resize attributes.
Migration:
- Schema fingerprint (
validationVersion: 1onboard.height): Validatingboard.heightas a positive finite number changes the derived full-board schema fingerprint fromfnv1a64:27af7e408a220c1ctofnv1a64:8600a0f12413723e:- Apps with a named schema (
schema: { id, version }): bumpschema.version, pass amigratehandler tocreateSyncServer(andschema.migrationsfor stored envelopes) that clamps or deletes any non-positive or non-finiteboard.height(or returns valid documents unchanged), and let the server promote existing rooms automatically. - Apps storing
{ document, schema }envelopes on the default derived identity: reopen each document throughcreateEditorand save a fresh envelope. - Apps storing bare document JSON: ensure every
boardelement'sheightis a positive finite number (or omit it for the480default). - Populated sync rooms on the default derived identity: start a new room seeded with the validated document.
- Apps with a named schema (
- Allow moving paragraphs inside and between board notes in
-
- Prevent
OverridePluginfrom deleting empty read-only blocks beside selectable block voids on Backspace/Delete - Fall through instead of swallowing Enter/Backspace when a
rulesliftaction produces no change
- Prevent
-
2f93384by @zbeyens – HardenuseExcalidrawSyncand upgrade the@excalidraw/excalidrawpeer to^0.18.1- Require
@excalidraw/excalidraw@^0.18.1(patching Mermaid XSSCVE-2025-54881via@excalidraw/mermaid-to-excalidraw@2.2.2/mermaid@11) and declarereact-domonplatejs/excalidraw/react. - Replace
excalidraw.restorewithrestoreElementsandrestoreAppStateonuseExcalidrawSync, and addrefreshto itsapiparameter so the hook owns scroll-offset alignment automatically. - Pin body-portaled Excalidraw dialogs to the viewport in
useExcalidrawSyncso Export, Help, and Command Palette modals stay visible on scrolled pages, and flush Excalidraw layout breakpoints on container resize. - Skip full
serializeAsJSONon unchanged pan, zoom, hover, and selection events, and re-project the stored scene if the editor vetoes a canvas write.
Migration: Upgrade
@excalidraw/excalidrawto0.18.1or newer. Callers passing the@excalidraw/excalidrawmodule andExcalidrawImperativeAPItouseExcalidrawSyncneed no call-site change; hand-built mocks must providerestoreElements,restoreAppState, andrefresh. - Require
-
95dacdaby @zbeyens – MakeBaseMentionPluginstateless and preserve marks on markable-inline voids across HTML, Markdown, and DOCX- Remove unused
TMentionItemBaseandMentionPluginState(initialState.insertSpaceAfterMention); pass{ trailingSpace: true }inMentionInsertOptionsoninsert()instead - Reject blank
labelvalues inBaseMentionPluginschema (validationVersion: 1, updating compiled schema fingerprints) and omit blank labels on insert and decode - Preserve marks on
markable-inlinevoid elements across HTML serialization, Markdown mention links, and DOCX export (reporting unmapped schema marks underlossPolicy: 'reject')
- Remove unused
-
- Add pure
readFields(document, options?)toplatejs/fieldfor inspecting template and document fields without creating an editor. - Return structured refusals instead of throwing when untrusted JSON inputs are passed to
applyFieldValues,startFieldValues,fieldSubmission,readFieldAnswers, orreadFields. - Export
FieldAccessfromplatejs/field/reactand returnlockedandwaitsForReviewfromuseFieldRead(fieldId). - Refuse mirrored field fills atomically when any same-name sibling or its enclosing block holds a pending authored deletion.
- Fall back to option
valuein plain-text field formatting when an optionlabelis blank or whitespace.
- Add pure
-
- Unify handwritten ink with
platejs/aiandplatejs/ai/react: add opt-inink?: booleanongetEditorTools,createEditorAgent,useEditorAgent, andregisterEditorToolsexposing<prefix>_read_inkand<prefix>_set_ink_digitizedwith visibility, hidden-descendant, lock, preview, draft, revision (expectedRevisions), and idempotency replay checks, plus optionalquestion?: stringmetadata on<prefix>_comment(exposed on<prefix>_list_commentsand rejected onthreadIdreplies). - Simplify
platejs/inkandplatejs/ink/react: inlineInkBlockInputintoInkMarkInput, remove the uncalledread.rangeandInkRangeInputAPIs, require liveblock: stringonInkPassage(omitting non-live blocks and gatingapi.imagessaved-geometry fast path on matching live copies), split sibling highlight (data-ink-highlights,--ink-highlight-blend) and stroke (data-ink-strokes) SVG layers without an isolatingzIndexon[data-ink-layer], and add stylus eraser-end dragging (button === 5/buttons & 32) across active draw tools.
- Unify handwritten ink with
-
79a1ba7by @zbeyens – Remove unreachableprojection,policy,ComparisonEvidence,ComparisonSnapshot.fingerprint,ComparisonCorrespondence.id, and dead lineage diagnostic codes (expired-lineage,identity-hint-rejected,incompatible-schema) fromplatejs/diff, and validate snapshot payloads directly inAuthoredPlugin.api.proposeComparison.Migration: Remove
projectionfromcompare(...)calls (project authored documents first withprojectAuthoredDocumentfromplatejs/authored) and stop readingcomparison.policy,snapshot.projection,snapshot.fingerprint,change.evidence,correspondence.evidence, orcorrespondence.id. -
fb1a962by @zbeyens – Emitstyles.table.header.backgroundColorin a Word table look style so plain header cells keep their Word shading without leakingbackgroundColoronto imported Plate cells -
- Preserve table column widths, positive
marginLeft, row heights, direct cell/row/table shading, and explicit or hidden (nil) cell borders inimportDocxandexportDocx. - Decode Word
Table of Contentscontent controls andTOCfields intotocblocks inimportDocx, and wrap exportedtocblocks in aneditor:toccontent control for lossless round-trips. - Preserve normalized column widths, row heights, positive table indentation, cell shading, and explicit borders when pasting tables from Microsoft Word or Excel via
WordPastePlugin. - Validate
limits(maxBytes,maxNodes,maxDepth) as positive safe integers throwingTypeErroracross HTML and Markdown parsing and streaming APIs. - Preserve the editor value type
VinHtmlApi<V>.serialize({ document }).
- Preserve table column widths, positive
-
- Maintain locked content-root lookups incrementally across property, structural, and board reshaping commits
- Read active transaction drafts in
BaseLockPlugin.read, veto locked ancestors andchildRootsduring structural writes, and insert schema default blocks with structured refusal errors oninsertBreak - Update
useIsLockedanduseIsOwnLockedon document replacement and returnfalsesafely whenLockPluginis not installed
-
- Guard plugin schema property handle lookups against
Object.prototypekeys such asconstructor - Preserve
schema.content.elements(...)defaults andcontent.default.propertiesduring Plate model lowering
- Guard plugin schema property handle lookups against
-
- Remove
editor.read.ranges.projectandProjectedRangeSegmentre-export
- Remove
-
bdb0124by @zbeyens – RemovevalueCodecs,StateFieldCollabPolicy,SerializedEditorValue, andSerializedEditorEffectre-exports and expose opaqueEditorStateField,EditorEffectType, andEditorUpdateAnnotationhandlesMigration:
- Replace
valueCodecspresets with direct inlinepersist: { decode, encode, version }declarations ondefineStateFieldanddefineEffect. - Update explicit generic annotations from
EditorStateField<T, TEncoded, TCollab>toEditorStateField<T>, and fromEditorEffectType<T, TEncoded, THistory>/EditorEffect<T, TEncoded, THistory>toEditorEffectType<T, THistory>/EditorEffect<T, THistory>. - Remove
collabfromdefineEffectoptions, removeStateFieldCollabPolicy,SerializedEditorValue, andSerializedEditorEffecttype imports, and seed initial field values throughdefineStateField({ initial })ortx.setField(field, value)instead offield.serialize(...)orfield.effect.
- Replace
-
- Add
platejs/sync/postgresre-exportingpostgresStorage,postgresSyncSchemaSql, and PostgreSQL adapter types - Re-export
SYNC_MAX_ENTRY_META_BYTES,SyncDocumentSnapshot,SyncGetDocumentOptions,SyncJoinRefusal,SyncSubmitRefusal,SyncReceipt, and updated server hook/storage types acrossplatejs/syncandplatejs/sync/server - Accept
initial?: SyncDocumentSnapshotonSyncPluginandSyncReactPluginfor SSR hydration - Add
policyCode,grantMeta, andexpiresAtsupport tocreateSyncServerAgentinplatejs/ai
- Add
-
ee4dfdaby @zbeyens – Fix aBaseIndentPlugincorrection crash on top-level paragraphs whenindentMax: 0is configured, narrow plugin correction and transform input-ruletxtypes to match their runtime transaction surfaces, and strip nestedtxOnlycontrols onstate.transactionportals.
plitejs
Patch Changes
-
- Guard void-boundary backward delete against read-only elements, write vetoes, isolating/void targets, and schema containment across both commands and
tx.text.deleteBackward() - Preserve named-root selection on start-of-block breaks,
NodeSelectionnode transforms, and struck-content break/soft-break landing - Guard
transposeCharacteragainstNodeSelectionand read-only targets - Fix grid-edge
insertNodes/splitNodeslanding, whole-document[grid, p, grid]landing, cell-end void range removal, and required-remainder caret placement on top-level whole-block deletion
- Guard void-boundary backward delete against read-only elements, write vetoes, isolating/void targets, and schema containment across both commands and
-
- Reconcile named-root value updates in the mounted browser handle without mutating immutable element
idproperties.
- Reconcile named-root value updates in the mounted browser handle without mutating immutable element
-
- Fix
tx.history(),tx.history.hasUndo(),tx.history.hasRedo(), andtx.history.pending()inside activeeditor.update((tx) => ...)transactions (and striptxOnlycontrols ineditor.read.transactionspecs) - Avoid bumping
editor.read.history().revisionon skipped or remote commits when both undo and redo stacks are empty
- Fix
-
79a1ba7by @zbeyens – Remove unreachableprojection,policy,ComparisonEvidence,ComparisonSnapshot.fingerprint,ComparisonCorrespondence.id, and dead lineage diagnostic codes (expired-lineage,identity-hint-rejected,incompatible-schema) fromplitejs/diff, and validate snapshot payloads directly ineditor.api.authored.proposeComparison.Migration: Remove
projectionfromcompare(...)calls (project authored documents first withprojectAuthoredDocumentfromplitejs/authored) and stop readingcomparison.policy,snapshot.projection,snapshot.fingerprint,change.evidence,correspondence.evidence, orcorrespondence.id. -
- Isolate speculative
assignFreshNodeKeyandsetNodeKeywrites inside the active overlay and keep overlay-backed snapshot indexes out of the global cache - Fix read-value isolation for frozen containers holding mutable built-ins, array expando properties, and
Date/Map/Set/SharedArrayBuffervalues nested past depth 16 - Enforce
contentMarks: falsein string-keyeditor.read.schema.getPropertyreads and reject voids and mixed block/inline siblings incanPlaceAtPathon undeclared parents - Bound reserved element ID minting retries and throw when a generator produces
undefinedor exhausts fresh IDs instead of returning an empty string or falling back tofill.* - Omit
structurefromSchemaTextBlockOptions, reject forbidden keys (including explicitundefinedand union branches) onschema.element.textBlock, makeschema.contentnamespace-only, preserve schema descendant lookup onReadValue<V>, and add optional per-root typing toEditorDocumentValue<V, TRoots>
- Isolate speculative
-
- Pass live
EditorCoreStateViewas the second argument tonodeWriteVetocontributors - Publish and swallow
EditorRefusalErrorcleanly whendispatchCommandruns outside an active transaction
- Pass live
-
- Evaluate
plugin.api(...)once per publication on the main editor instead of twice, keeping the same API object identity across activation callbacks and post-commit reads while preserving per-view evaluation oncreateEditorView - Treat inline array literals with equal ordered plugin sequences in
definePluginCompartment().of([...])andtx.plugins.reconfigureas no-op swaps instead of re-publishing the configuration
- Evaluate
-
- Deliver
subscribeCommitand pluginon.commitnotifications in commit-version FIFO order during re-entrant updates - Fix
sameResultcomparison for frozen plain objects containingtextorchildrenproperties - Route
usePathanduseElementSelectedthrough the shared selector store and isolate duplicate detached projection node keys - Remove
editor.read.ranges.projectandProjectedRangeSegment
- Deliver
-
7fc27f7by @felixfeng33 – Forward the thirdoptionsargument ineditor.update.plugins.reconfigure(compartment, input, options)so schema migrations run during direct plugin reconfiguration. -
bdb0124by @zbeyens – NarrowEditorStateField,EditorEffectType, andEditorUpdateAnnotationinto frozen opaque handles, removevalueCodecs,defineEffect({ collab }),StateFieldCollabPolicy,SerializedEditorValue,SerializedEditorEffect, andfield.effect, and treat decodedundefineduniformly as absent- Narrow
EditorStateField<TValue>,EditorEffectType<TValue, THistory>, andEditorUpdateAnnotation<TValue>to frozen opaque handles (keyplusnameon state fields) without exposing internal runtime callbacks (serialize,deserialize,compare,initial,persist,history,collab,reduce,effect,invert,map,combine), and drop theTEncodedtype argument fromEditorEffect<TValue, THistory> - Remove
valueCodecs,defineEffect({ collab }),StateFieldCollabPolicy,SerializedEditorValue, andSerializedEditorEffectfromplitejs - Treat
persist.decodeandlegacyDecodersreturningundefineduniformly as absent (initial) across cold load, late install, captured views, persisted completion,TransactionSpecreplay, andtx.value.replace
Migration:
- Replace
{ ...valueCodecs.string, version: 1 }and othervalueCodecspresets with direct inlinepersist: { decode, encode, version }declarations ondefineStateFieldanddefineEffect. - Update explicit generic annotations from
EditorStateField<T, TEncoded, TCollab>toEditorStateField<T>, and fromEditorEffectType<T, TEncoded, THistory>/EditorEffect<T, TEncoded, THistory>toEditorEffectType<T, THistory>/EditorEffect<T, THistory>. - Remove
collabfromdefineEffectoptions and remove imports ofStateFieldCollabPolicy,SerializedEditorValue, andSerializedEditorEffect. - Seed default field values through
defineStateField({ initial })ortx.setField(field, value)instead ofmeta: { [field.key]: field.serialize(...) }, and update fields withtx.setField(field, value)instead of readingfield.effect.
- Narrow
-
- Update
SyncStoragewith monotonic(epoch, head, revision)CAS fencing (settlenow returnsSyncSettleResult,checkpointsreturnsCheckpointMeta[],resetaccepts optionalexpectedand returnsSyncRoomUpdateResult, andpeek(),readSnapshot(), andupdateSchema()are required for custom adapters), immutable writer marks/receipts, and automatic legacy Durable Object SQLite migration inplitejs/sync/cloudflare - Add lineage-ordered named schema evolution (
updateSchemaandmigrate),OutboxHead.schemakept recovery, and publicunload/checkpointEveryoptions oncreateSyncServer - Add
SyncGrant.meta, asynconAdmitpolicy admission ('policy'+code), two-modeprojectReadwith turn-free fail-closedserver.getDocument, ordered out-of-turnonSettled/onRefusedobservers, andretentionMs/onBeforeCompacthistory archival - Add dependency-free
plitejs/sync/postgresexportingpostgresStorageandpostgresSyncSchemaSql - Add optional SSR hydration via
initial?: SyncDocumentSnapshotonsync()and digest verification inhello
- Update
-
ee4dfdaby @zbeyens – Maketx.roots()callable inside transactions, spec builders, andeditor.candry runs to read draft roots without mutating committed root caches. Isolate throwing post-commit admission, guard publication, and queued notification callbacks so committed listeners andafterCommitstill run, enforce allowlistededitor.updatebounds forchanges,plugins,records, androots, and strip nestedtxOnlycontrols recursively in spec builders and dry runs.
Full changelog: v54.0.0-beta.10...v54.0.0-beta.11