github udecode/plate v54.0.0-beta.7
v54.0.0-beta.7 (2026-11-27)

pre-releaseone hour ago

@platejs/cli

Patch Changes

  • 2c357bb by @zbeyens – Add plate codemod plite-to-plate to automate migrating Plite projects to Plate (rewriting imports, JSX components, DOMEditor calls, plugin options, and package.json, with structured diagnostics and TODO comments for manual steps), and mark platejs as an optional peer dependency

@platejs/test

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

platejs

Minor Changes

  • fe90073 by @zbeyens – Re-export useEditorEditableElement, UseEditorSelectorOptions, and UseStateFieldValueOptions by identity from platejs/react.

  • 38eb5de by @zbeyens – Re-export the eight drag and geometry types (DOMDragApi, DOMDragStart, DOMDropEdge, DOMDropTarget, DOMDropTargetInput, DOMDropTargetOptions, DOMGeometryRect, DropIndicator) from platejs/dom, GaveWrite and SplitGave from platejs/authored, and TypedText and TypedTextListener from platejs/react by identity. Rename the internal inkRecords plugin name from 'ink-records' to 'inkRecords'.

  • f988d66 by @zbeyens – Search every document root in BaseFindPlugin in recursive owner reading order, update changed roots incrementally without polling unchanged boards, isolate match decorations and observer notifications per view root, and allow update.select() to select matches in any root from any view.

  • d2cc369 by @zbeyens – Accept clipboardFormatKey on platejs/react's createEditor and useCreateEditor via DOMPlugin store state and chained plugin activate stages, validate editor.install, tx.plugins.reconfigure, and slotted plugin inputs before any cleanup to reject Plate plugins with a createEditor({ plugins }) and store.set({ ... }) error, reject unsupported schema keys at runtime on both object and factory schemas, and drop history, HistoryOptions, HistoryPlugin, HistoryPluginTypes, and HistoryPluginTypeProvider from platejs/history in favor of HistoryPlugin.configure(...).

  • 353fcec by @zbeyens – Replace shouldUpdate on useEditorSelector and useEditorState with declarative dependsOn, and re-export EditorSelectorDependency and EditorSelectorDependencies from platejs/react.

    • Migrate UseEditorSelectorOptions and UseEditorStateOptions to { dependsOn?, equalityFn? } and update Plate's built-in hooks, NodeSelection, FieldPlugin, and ListPlugin to declare their dependencies with dependsOn.
    • Commit normalized dependsOn changes in a layout effect rather than mutating selector filters during render, and include equalityFn in useEditorSelector's snapshot cache key.

Patch Changes

  • 6f5622e by @zbeyens –

    • Block ink tool activation and pen, eraser, or lasso edits while a view is in Authored Preview
    • Store optional inline-void display labels on InkCopy so InkCopyView renders mention text instead of raw U+FFFC
    • Translate text marks horizontally when their block shifts, prune unreferenced ink-gone records in dropDigitized, and restore viewport-scoped ink placement on afterprint
    • Remove experimental 54.0.0-beta.2 ink record compatibility; saved ink uses the packed format only
  • 55025b2 by @zbeyens – Fix EditorRoot onValueChange to emit commit-scoped EditorDocumentValue without replaying commits across React Activity reconnects or forcing lazy state codecs on ephemeral writes, export UseStateFieldValueOptions from platejs/react, and default selector option generics to unknown

  • c06c7de by @zbeyens – Re-export useEditorRootAreas and EditorRootAreas from platejs/react.

  • 42e913d by @zbeyens – Add experimental tx.plugin(BaseInkPlugin).dropDigitized(ids?) to permanently drop digitized ink marks, their digitized records, and any saved block copies no remaining mark references.

  • 93af01d by @zbeyens – Merge derived-read React hooks (useEditorState, useEditorRuntimeState, useRuntimeState, useRootState, and useEditorViewState) into useEditorSelector with both context and explicit-editor overloads plus view-state dependsOn tokens ('authored', 'composing', 'focused', 'readOnly', and 'view').

  • c39072c by @zbeyens – Add optional withHistory callback to CreateCommentThreadInput on BaseCommentsPlugin for atomic record-only history writes after comment creation commits, and include margin notes in BaseInkPlugin.read.passages with margin side metadata on InkPassageMark.

  • 132c1ce by @zbeyens – Rename platejs/react plugin attributes type NodeProps to NodeAttributes so platejs/react re-exports core NodeProps

    Migration: Update plugin render.attributes type annotations from NodeProps to NodeAttributes:

    import type { NodeAttributes } from 'platejs/react';
  • 99a2bf1 by @zbeyens –

    • Add free text to boards (BaseBoardTextPlugin, BoardTextPlugin, setTool('text') with the T shortcut, and double-clicking an empty spot on the board). Clicking places auto-sized text that grows in width and height as you type (autoSize: true); dragging or resizing locks a fixed wrapping width (autoSize: false). In Editing mode, leaving an unmodified newly clicked text box discards it without adding an undo step. Typing near a board edge pans the camera to keep the caret in view without changing the document, and exportPicture measures both width and height of auto-sized free text.
  • e6f8893 by @zbeyens – Keep the caret inside an edited board note or shape when clicking empty paper or padding outside its text

  • 197d09b by @zbeyens –

    • Grow board notes with their text while keeping each note's stored size as its height floor, update bound arrows and hit tests to the grown height, preserve dragged heights on resize and drawn arrow ends when a note is removed, and measure static notes marked with data-board-text during exportPicture so exported notes and arrows draw whole.
  • 78e5525 by @zbeyens –

    • Place each board shape's root in a div that carries the shape's box, stacking rank and drag offset, and make the root fill it. Read a shape's inline left, top, width, height, z-index or translate, and its offsetLeft and offsetTop, on the root's parentElement. A private @layer board-shapes style rule prepended to the root makes the wrapper take no press and restores pointer-events: auto on [data-board-shape] (set inert on an ancestor to disable pointer input on a board). The root keeps its className, marks and non-placement style, uses box-sizing: border-box, and ignores all, offsets, margins, width, height, position and grid placement or self-alignment keys from style.
  • e63d5c7 by @zbeyens – Index DOCX export hosts once per render so comments and review revisions anchor inside rendered named roots without colon-delimited key collisions, fix multi-comment offset shifts on shared text nodes, paint review marks across every rendered copy of a shared named root without spanning v1 review bookmarks over foreign roots, and warn on named-root only for stored roots not rendered into the DOCX output.

  • d0fc717 by @zbeyens – Support multi-test field conditions ({ all: FieldConditionTest[] } and { any: FieldConditionTest[] }) with three-valued evaluation shared by the fill view and applyFieldValues. Export FieldConditionTest, include other roles waited on by optional fields in pending, name the first waiting role in UTF-16 code-unit order in waiting refusals, map every test ref on paste, duplicate and table fill, compare condition lists in any order across named field groups, and allow update to repair broken rules one at a time while refusing newly introduced problems or loops.

    Migration:

    • TypeScript callers: FieldCondition is now a union of FieldConditionTest, { all: readonly FieldConditionTest[] }, and { any: readonly FieldConditionTest[] }. Narrow a condition ('ref' in condition, 'all' in condition, or 'any' in condition) before reading ref, test, or value.
    • pending on optional fields: applyFieldValues and startFieldValues now include any other role waited on by an unsubmitted role's optional field in pending, so existing templates where an optional field waits on another role return that role in pending until it submits.
    • Reserved keys on legacy single-test conditions: all and any are now reserved discriminators on FieldCondition. If a saved single-test document attached a custom extra key named all or any, rename that key before loading.
    • Schema fingerprint (validationVersion: 2): Widening the condition validator changes the derived schema fingerprint for editors using BaseFieldPlugin or FieldPlugin:
      • Apps with a named schema: bump schema.version, register the previous schema fingerprint, and return each document unchanged (after renaming any custom all/any key on legacy single tests).
      • Apps storing { document, schema } envelopes on the default derived identity: reopen each document through createEditor and save it again.
      • Apps storing bare document JSON: no migration required unless a single test holds a custom all/any key.
      • Populated Yjs rooms: start a new room seeded with the converted document.
  • c3f69d6 by @zbeyens – Add read.conditionTargets(fieldId) to BaseFieldPlugin to return the field ids in document order that a condition on fieldId may target without closing a loop, plus any field the condition already names. Check name-group condition conflicts without recursion so deep chains of named fields do not overflow the stack.

  • b7b55b5 by @zbeyens – Add the multiple field kind with optional min (>= 2) and max (>= 1) count bounds, includes and not-includes condition tests, order-insensitive comparison across name groups, answer-conflict and startFieldValues, comma-joined option labels in plain text and Word export, data-field-min and data-field-max HTML attributes (mapping imported min=1 on multiple fields to required: true), and { kind: 'multiple', value?: readonly string[] } in readFieldAnswers. Remove the unused defaultValue field property and data-field-default-value HTML attribute.

    Migration:

    • Removed defaultValue: Delete the defaultValue key (do not leave defaultValue: undefined) from every field node before loading documents under the closed schema or passing them to the field helpers. applyFieldValues and startFieldValues refuse a field carrying defaultValue as malformed, and readFieldAnswers and fieldSubmission silently skip malformed fields. Remove defaultValue from any insert or update call. Apps that store application defaults keep them outside the field schema or prefill with startFieldValues.
    • TypeScript callers: FieldValue now includes readonly string[], FieldKind includes 'multiple', FieldTest includes 'includes' and 'not-includes', and FieldAnswer includes { kind: 'multiple'; value?: readonly string[] }. Note that Array.isArray(value) does not exclude readonly string[] from the false branch in TypeScript; narrow with typeof value === 'object' or a value is readonly string[] predicate where a scalar value is expected.
    • Schema fingerprint: Adding 'multiple', min, max, widening value (validationVersion: 2) and condition (validationVersion: 3), and removing defaultValue change the derived schema fingerprint for editors using BaseFieldPlugin or FieldPlugin:
      • Apps with a named schema: bump schema.version, register the previous schema fingerprint, and delete defaultValue from each field node in the migration step.
      • Apps storing { document, schema } envelopes on the default derived identity: verify the previous fingerprint, delete defaultValue from each field node in envelope.document, open with createEditor({ initialValue: migratedDocument, initialSelection: envelope.selection, plugins }), and save a fresh envelope.
      • Apps storing bare document JSON: delete defaultValue from each field node before calling createEditor, applyFieldValues, startFieldValues, fieldSubmission, or readFieldAnswers.
      • Populated Yjs rooms: start a new room seeded with the migrated document.
  • 7b6db1c by @zbeyens – Scope footnote anchors, HTML serialization, and static rendering by content root, and omit fragment targets for unresolved named-root footnotes.

  • 3a8a547 by @zbeyens – Keep ink marks attached to their words across edits elsewhere in the same paragraph and across line wraps with shape-aware reflow (flow, box, span, rigid), add BaseInkPlugin.read.liveMarks(), and support live-block passages (InkPassage.block) and { block, start, end } ranges in read.range and InkPlugin.api.images.

  • d77c7d1 by @zbeyens –

    • Add experimental digitized ink state on BaseInkPlugin: the ink-digitized record set, tx.plugin(BaseInkPlugin).setDigitized(ids, value) and editor.plugin(BaseInkPlugin).read.shownMarks(). Digitized marks stay saved without showing signs or deleted signs, leave with remove, and drop orphan digitized records on load.
  • b792254 by @zbeyens –

    • Add experimental editor.plugin(InkPlugin).api.images(passages, { maxSide }) (with InkImagesOptions and InkPassageImages types) to render inkAlone and inkOnText Canvas 2D PNGs, pixel mark boxes, and inline void text from the live view.
  • 6bed86f by @zbeyens –

    • Add experimental read.passages(ids) and read.range({ copy, start, end }) on BaseInkPlugin (with InkPassage, InkPassageMark, InkPassageWord, and InkRangeInput types) to read marked line passages and resolve saved copy character offsets to live ranges.
  • f7e3f32 by @zbeyens –

    • Update InkPlugin and InkContent placement, lasso, Backspace, and Delete to read shown marks via read.shownMarks(), skipping digitized marks on default passes and leaving faded digitized marks untouched by the eraser, Backspace, and Delete.
    • Add experimental editor.plugin(InkPlugin).api.setShowDigitized(value) (with showDigitized on InkViewState and optional digitized on InkSign) to show digitized marks faded over their words or as separate digitized signs and let the lasso pick them.
  • f4f653b by @zbeyens – Preserve another focused field's DOM selection when NodeSelectionDrag releases after a focus redirect or receives key events while unfocused

  • 7c07401 by @zbeyens –

    • Remove EditableProps, LeafNodeProps, TextNodeProps, RenderElementFn, RenderLeafFn and RenderTextFn. Use EditorContentProps for EditorContent props, and write a plugin's leafAttributes and textAttributes callbacks inline, where Plate infers their props.
    • Type context.editor as Plate's Editor in every EditorContent handler that takes a context, such as onKeyDown, onClick and onPaste, and in the handler types, such as EditableKeyDownHandler. scrollSelectionIntoView gets Plate's Editor too. Export EditablePointerSelectionEndHandler from platejs/react.
    • Accept a plugin in PluginPortal and BasePluginPortal, as in PluginPortal<typeof MyPlugin>, distribute over unions of plugins, and keep an erased PluginReference portal's schema optional and kind-dependent.
    • Export EditorReference, type useRootEditor to return Plate's Editor, and refuse at compile time an EditorRoot editor typed as a non-editor value or a raw Plite editor or view. A generic component that passes its editor to EditorRoot constrains it, as in <E extends EditorReference>.
    • Remove name from PluginDefinitionInput and BasePluginDefinitionInput.
    • Refuse at compile time a definePlugin schema key other than contentRoots, element, mark and properties, including explicit unions containing Plite-only keys.
  • 1f7b27c by @zbeyens –

    • Remove useAnnotationStore, useAnnotation, useAnnotations, UseAnnotationStoreOptions, Annotation* re-exports, and unused ViewSource* (ViewSourceOptions, ViewSourceStatus, ViewSourceError, ViewSourceErrorSink, ViewSourcePhase) exports from platejs/react.
    • Export CommentAttachmentChange from platejs/comments as the payload type for subscribeAttachments.

    Migration: Replace useAnnotation* with editor.anchor, commit.changed.anchors(), and DecorationSource. Update subscribeAttachments listener types from AnnotationChange to CommentAttachmentChange from platejs/comments.

  • 82c983d by @zbeyens – Remove ElementIdPlugin and reserve id across every editor schema

    • plitejs schemas now refuse declaring an element id property (naming the reserved id key), and editor readers type returned elements with a required id: string while detached inputs (ElementIn, InitialValue) and element guards (ElementApi.isElement) keep id optional.
    • Removed ElementIdPlugin, its generateId option, HtmlExportKit / HtmlExportSchemaKit, and the internal readElementById helper; Markdown <block id>, Ink, HTML export, and document migrations now read core's reserved id directly.
  • 39fa61e by @zbeyens – Remove unused jotai, jotai-x, jotai-optics, and optics-ts dependencies so apps using Jotai no longer install duplicate copies

  • ffb8e06 by @zbeyens –

    • Move render prop types off root platejs: import RenderElementProps, RenderLeafProps, RenderTextProps, RenderTextHostProps, and RenderTextPieceProps from platejs/react, and import StaticRenderLeafProps, RenderStaticNodeWrapper, RenderStaticNodeWrapperFunction, and RenderStaticNodeWrapperProps from platejs/static.
    • Pass attributes into render.mark.textAttributes callbacks during static HTML rendering, matching React rendering.
  • cc06ae9 by @zbeyens – Allow whole row, column and table format suggestions in Suggesting mode, preserve displayed column widths when copying across a pending column deletion, and keep merged cells, row moves, container edits around tables, and a second row, column, or format suggestion already visible to the writer refused up front.

  • 170132f by @zbeyens – Enforce zero-argument runtime guards on useEditor() and useOptionalEditor(), tighten useCreateEditor() typing, and rebind useStateFieldValue and useSetStateField to Plate's useEditor().

    • useEditor() and useOptionalEditor() in platejs/react now throw when passed any argument (including undefined), matching plitejs/react.
    • Zero-argument useCreateEditor() now returns a non-null default editor and refuses caller-supplied generics without an options object.
    • useStateFieldValue and useSetStateField now resolve through Plate's useEditor(), so components under a passive EditorProvider read and update the provider's editor. Plate's UseStateFieldValueOptions omits deferred to match useEditorState and useEditorSelector.
    • Inside <EditorContent readOnly>, Plate's per-node render readOnly now reports true.

plitejs

Major Changes

  • fe90073 by @zbeyens – Unify Plite selector options, read-only hook, and DOM API with Plate:

    • Rename EditorSelectorOptions to UseEditorSelectorOptions, add = unknown default on UseStateFieldValueOptions, and remove public deferred from UseEditorSelectorOptions, UseStateFieldValueOptions, and EditorRuntimeSelectorOptions (wrap selector results with React useDeferredValue instead).
    • Remove useOptionalEditorReadOnly from plitejs/react; use useEditorReadOnly() directly (returns false outside providers).
    • Unexport DOMEditor (value and type) from plitejs/dom; use editor.api.dom.* and editor.api.dom.clipboard.*.

Minor Changes

  • 38eb5de by @zbeyens – Rename the authoredRecords plugin name from 'authored-records' to 'authoredRecords' to match the lower camel case plugin naming convention.

  • 353fcec by @zbeyens – Replace the shouldUpdate callback option and internal options (runtimeEventSource, profileId, includeRootOrderChanges, nodeKey, nodeKeys) on public React selector hooks (useEditorSelector, useEditorState, useEditorRuntimeState, useRuntimeState, useRootState) with declarative dependsOn.

    • Export EditorSelectorDependency and EditorSelectorDependencies from plitejs/react. Pass commit change kinds (such as 'selection', 'document', or ['properties', 'structure']), defineStateField descriptors, or { nodeKey, kind? } / { nodeKeys, kind? } objects to dependsOn.
    • Remove shouldUpdate and runtimeEventSource from public selector option types, and drop the unused second TEditor type parameter on EditorRuntimeStateSelectorOptions<T = unknown> (callers passing two type arguments drop the second one); internal mounted-render subscriptions stay private inside plitejs/react.
    • Keep useNodeSelector and useTextSelector from accepting internal render-skip policies through forwarded option objects, and remove useRootState's unconditional root prefilter so record-only writes and version reads stay fresh.

Patch Changes

  • 82c983d by @zbeyens – Remove ElementIdPlugin and reserve id across every editor schema

    • plitejs schemas now refuse declaring an element id property (naming the reserved id key), and editor readers type returned elements with a required id: string while detached inputs (ElementIn, InitialValue) and element guards (ElementApi.isElement) keep id optional.
    • Removed ElementIdPlugin, its generateId option, HtmlExportKit / HtmlExportSchemaKit, and the internal readElementById helper; Markdown <block id>, Ink, HTML export, and document migrations now read core's reserved id directly.
  • 4a54c17 by @zbeyens –

    • Fix collapsed deletes, merges, and points.before/points.after inside or beside non-selectable blocks, childless block atoms, isolating siblings, trailing-inline line breaks, and container hanging ranges
  • c06c7de by @zbeyens – Add useEditorRootAreas to read which named roots have standalone editing areas in the view's presentation and whether a view is the active copy for its root.

  • 93af01d by @zbeyens – Merge derived-read React hooks (useEditorState, useEditorRuntimeState, useRuntimeState, useRootState, and useEditorViewState) into useEditorSelector, add view-state dependsOn tokens ('authored', 'composing', 'focused', 'readOnly', and 'view'), export useModelEditor from plitejs/react, and fix stale-view readOnly locking for absent roots.

  • 132c1ce by @zbeyens – Remove EditorElement, EditorLeaf, and EditorText from plitejs/react public exports

    Migration: Spread attributes onto your own element in renderElement, renderLeaf, or renderText:

    const renderElement = ({ attributes, children }: RenderElementProps) => (
      <p {...attributes}>{children}</p>
    );
  • 55025b2 by @zbeyens – Unify EditorRoot onValueChange to emit the full EditorDocumentValue on document or persisted-state changes, align CommitContext, SelectionChangeContext, and ValueChangeContext to take <E>, drop unused authorId and document props from EditorRootProps, and recreate useCreateEditor when options.id changes

    Migration: Read value.children (or value.roots) in onValueChange handlers, and pass the editor type (for example ValueChangeContext<typeof editor>) instead of a value array type to commit context generics.

  • 48ff60f by @felixfeng33 – Fix creating the authored plugin at module scope on Cloudflare Workers, which threw because it drew a random id on creation

  • caeb87e by @felixfeng33 – Fix Backspace or typing over a block selection in Editing mode leaving another author's pending deletion struck when the selected blocks hold all of it. The write now accepts that deletion, as it already did over a text selection.

  • b25e5e8 by @zbeyens –

    • When app code moves focus during an editor focus call, a selection export, a caret repair or a queued selection clear, focus and the caret stay where the app put them, and the editor no longer marks itself focused while it does not hold focus
  • cbf74c3 by @zbeyens –

    • Clear a root's pending DOM selection import hold when selection leaves that root or the root blurs, so returning focus within the selectionchange throttle window still exports the root's saved caret to the DOM
  • 9515b86 by @zbeyens – Add commit.changed.anchors() and the ReadonlyAnchor type so commit listeners can read the live anchors whose stored value a commit changed without polling every anchor, and restore history anchors immediately on undo and redo commits.

  • 5cad385 by @zbeyens – Keep anchors, peer rebases, and history intact in untouched roots when another named root is created, edited, or deleted in the same update

  • e9898c6 by @zbeyens –

    • Fix a crash when starting an IME composition over a selection that spans an inline element such as a link
  • d3a3d25 by @felixfeng33 – Fix an Editing or Suggesting delete across two quotes that threw cannot contain "quote" when another author's pending deletion strikes a quote between them

  • f4f653b by @zbeyens – Preserve another field or nested editable's DOM selection when DOMEditor.focus, WebKit blur, or projected drag clears run without owning the selection

  • 1cc288e by @zbeyens – Remove block voids spanned by a hanging selection on delete and text insert

  • 1a2a3fa by @felixfeng33 – Add editor.api.history.record(effect, value, { firstWrite }) to record a session step, with HistoryRecordResult, HistoryRecordOptions and EditorEffectHistoryKind exported from plitejs. While a firstWrite promise runs, the step stays in undo and holds the redo it cleared, so redo returns busy. A first write that resolves blocked takes the step back and gives back the redo it held. The session effect's replay reads the promise as firstWrite on EditorEffectHistoryReplayContext, and a first write that rejects reports to the lifecycle error sink with phase apply.

    Migration: tx.effects.emit and editor.update.effects.emit now refuse a session effect, one defined with history: { replay }, both in types and at runtime. Record it outside any update instead:

    // Before
    editor.update((tx) => tx.effects.emit(threadEffect, step));
    
    // After
    editor.api.history.record(threadEffect, step);

    EditorEffectType<T> and EditorEffect<T> now stand for an effect of any history kind, so emit refuses them in types. A state field's effect, the effects getCollabEffects returns and the effect defineEffect returns for a push or skip effect keep emitting as before. Type your own parameter EditorEffectType<T, EditorJsonValue, StateFieldHistoryPolicy> to emit it.

  • 66aca3e by @zbeyens –

    • Keep focus in the active external text control, editor view, or outside button when an undo or redo runs from another external control, a focusPolicy: 'preserve' history control, or editor.api.history.undo().
    • Return focus and the caret to the forked synced-block copy after keyboard redo of an Unsync and after button undo of single- or nested-level Unsyncs, including keyed and delayed-mount slots.
    • Return focus to the last-used slot view when a history control replays a child root rendered by two panes sharing an owner element.
  • d2cc369 by @zbeyens – Export setDOMClipboardFormatKey and getPluginSlotInput from plitejs/internal for Plate's DOM plugin activation and dynamic plugin input validation.

  • 83cefab by @felixfeng33 – Fix a redo whose owner answers late: it keeps its place in undo when a skipped edit removed the step below it, it leaves undo when the undo limit would have dropped it, and a redo whose every effect a skipped edit removed no longer leaves an undo step that does nothing

  • 1f7b27c by @zbeyens –

    • Publish multi-source native typing and deferred decoration refreshes in one repaint per node while keeping fast typing across editors with multiple decoration sources.
    • Remove the plitejs/annotations entrypoint, useAnnotationStore, useAnnotation, useAnnotations, UseAnnotationStoreOptions, and unused ViewSource* (ViewSourceOptions, ViewSourceStatus, ViewSourceError, ViewSourceErrorSink, ViewSourcePhase) exports from plitejs/react.

    Migration: Replace plitejs/annotations and useAnnotation* with editor.anchor, commit.changed.anchors(), and a DecorationSource registered through EditorRoot or a plugin.

  • 487d022 by @felixfeng33 – Keep one author's change that starts inside that author's previous insertion or deletion on the same review card, such as a join inside a deletion of both its lines, so accepting the card no longer returns blocked

  • ee42782 by @zbeyens – Keep the destination line's key and stored id when pasting a matching block over an empty or wholly selected line (including inside quotes and under replaceEmpty landing policies), and restore the original document when rejecting a suggested multi-line paste at a line's end or over an empty line

  • 815c8e3 by @zbeyens – Record blocks pasted over part of a paragraph's text or at the end of a paragraph or quote as insertions in Suggesting, even when the document holds another pending change. Rejecting the suggestion now removes the pasted block instead of keeping it or refusing one-text blocks such as code blocks.

  • d31dbf4 by @zbeyens – Stamp pending DOM selection imports with the editor's placement generation and route deferred selection clears, settles, and caret repair retries through one freshness check so stale timers and pre-placement flags cannot overwrite newer browser or model selections.

  • 12a911e by @felixfeng33 – Fix a letter typed after Backspace removes the last letter of a line that another author's pending join strikes landing at the end of the line before. The letter now stays on that line, in Editing and Suggesting, and accepting the join still puts it after the text of the line before.

  • 170132f by @zbeyens – Rename plitejs/react's editor-creation hook to useCreateEditor, make useEditor() and useOptionalEditor() read the active editor from context, align React read hooks with useEditor(), and remove useCaretEditor and UseEditorOptions.

    • Replace useEditor(options, deps) with useCreateEditor(options, deps) (and UseEditorOptions with CreateEditorOptions). Zero-argument useCreateEditor() returns Editor<Value, readonly []> and rejects input-free type parameters.
    • useEditor() and useOptionalEditor() take no arguments (passing any argument, including undefined, throws at runtime) and return the editing area's editor inside an Editable or the active caret root's editor (falling back to EditorRoot's own root) outside every editing area. Note for apps upgrading from bare useEditor() with no arguments: useEditor() now reads from context instead of creating an empty editor, so switch creation calls to useCreateEditor().
    • Replace useCaretEditor() with useEditor().
    • useEditorSelector, useEditorState, useEditorSelection, useEditorFocused, useEditorComposing, useEditorReadOnly, useStateFieldValue, and useSetStateField now follow useEditor() so toolbars read and act on the same active root editor.
  • d77c7d1 by @zbeyens –

    • Allow tx.records.put and tx.records.drop in the same editor.update after a text or node edit whose intermediate draft is not yet canonical, normalizing and validating the draft at commit as usual.
  • 39fa61e by @zbeyens – Remove unused @noble/hashes dependency

  • 14beff3 by @zbeyens – Store a core-generated id on every element in every editor

    • Every editor whose schema declares no id element property now stores a unique non-empty string id on every element, including kept elements under preserve schemas, and supports nodes.byId(id) and at: { id } without declaring an id property.
    • New elements created by insert, split, wrap, paste, or live duplicate repair receive <scope>.<counter> ids from each editor's own mint, while loading a document without ids fills missing ids deterministically as fill.<n> across roots, spare lines, and Yjs rooms.
    • Empty strings and non-string element ids are refused locally, from peers, and on load with EditorSchemaValidationError.
    • Schema fingerprints now include the reserved id, so saved envelopes, native sync rooms, Yjs rooms, and saved history created before this change refuse to open with a schema-mismatch error; pass the plain document value to load it with filled ids.
  • ef3675f by @zbeyens – Invoke an editable root's registered viewport reveal handler and schedule one cancelable retry when DOMEditor.scrollIntoView misses a culled block or range.

  • e6f8893 by @zbeyens – Keep right-clicks and middle-clicks from starting projected text drags or collapsing model selection before contextmenu fires

  • ee0a8d7 by @felixfeng33 – Keep the key of a content root declared ownership: 'shared' when its owner is copied, pasted, duplicated or dragged, so the copy shows the same root instead of a clone. A root declared by its grammar alone is now exclusive: a second owner is refused, an open schema drops the root with its last owner, and an each table fill gives each cell its own copy.

    Migration: Declare ownership: 'shared' on a root that several blocks should show.

    body: { content: schema.content.text(), ownership: 'shared' }
  • 6606f85 by @felixfeng33 – Fix deciding a suggested line split in a different order giving a different document once someone moved the split's lower line: rejecting the split now joins the line it cut with the line now after it, as Google Docs does, and waits for another pending suggestion on that next line.

  • 7c07401 by @zbeyens –

    • Include PluginReference in EditorStateField, the type defineStateField returns, so TypeScript accepts a state field wherever it accepts a plugin reference, such as in plugins. Make a state field with defineStateField, because an object you build by hand no longer types as one.
  • a709688 by @zbeyens –

    • Hold one pending row, column or format suggestion per table. Suggesting a second one, adding or removing a single cell, changing a span (including inside an author's own pending inserted table), moving or splitting a row, adding, deleting, wrapping or unwrapping a block or outer table that holds a table, and an undo or redo that changes a table whose value or block window changed since its step while any pending mark waits there or the replayed step held one now refuse with cause-specific messages. After a history restore, an undo or redo that changes a table refuses in a document that holds a verdict or another authored record, unless it withdraws the writer's own pending change. A writer's own undo or redo of their pending row or column goes through when the sync room would take it.
    • Record a whole column as one suggestion in a forced proposal.
    • Refuse in Editing, while a table holds such a suggestion, inserting a row or column, moving a row or cell, removing some but not all columns, merging or splitting cells, and writing a property on the table, a row or a cell.
    • Add read.authored.gridLocked(node), which says whether a table waits as a suggested deletion or holds a pending row, column or format suggestion.
  • c59e6ec by @zbeyens – Keep select-all in a virtualized editor from drawing a duplicate native selection highlight while mount focus settles.

  • c945376 by @felixfeng33 – Fix Yjs peers reading the upper line's set-valued property on the lower line after one update changed that property on a line and split the line at its start.

Full changelog: v54.0.0-beta.6...v54.0.0-beta.7

Don't miss a new plate release

NewReleases is sending notifications on new releases.