github udecode/plate v53.3.18

2 hours ago

@platejs/ai

Patch Changes

  • Updated @platejs/markdown.

@platejs/core

Patch Changes

  • #5172 by @dylans – Upgrade to slate 0.142.1, slate-dom 0.142.0, slate-react 0.142.0 and slate-hyperscript 0.138.3.

  • #5190 by @dylans – Upgrade to slate 0.146.0, slate-dom 0.146.0 and slate-react 0.145.1.

@platejs/markdown

Patch Changes

  • #5185 by @ybai08 –

    • Apply allowedNodes, disallowedNodes and allowNode to the children of bold, italic and strikethrough, so disallowedNodes: ['a'] also removes a link inside **…**. An allowedNodes list now needs text, and any inline type such as a, listed to keep that content inside these marks, as it already does outside them.
  • #5179 by @dylans –

    • Keep HTML that has no rule as source: unknown tags, raw html nodes and HTML comments deserialize as a text leaf with rawHtml: true and serialize back unescaped. Before, <b>x</b> came back as \<b>x\</b>, and comments were dropped.
    • Keep Markdown inside unknown tags: <b>`code`</b> no longer loses its backticks, and a list or paragraph inside a block tag such as <details> keeps the blank lines around it, so it still renders as Markdown.
  • #5177 by @dylans –

    • Deserialize reference links and images ([text][id], [id][], [id], ![alt][id]) as a and img nodes using the matching definition's URL. They were dropped before, so a paragraph holding only a reference link came back empty.
  • #5178 by @dylans –

    • Stop serializing the empty text around inline elements (links, mentions, footnote references) as a zero-width space. Only an empty paragraph is written as ​ now, so Markdown output no longer carries invisible characters at the start or end of a paragraph.

@platejs/slate

Patch Changes

  • #5172 by @dylans – Bring the bundled history plugin up to date with slate-history:

    • withoutSaving, withoutMerging, withMerging and withNewBatch restore their flags when the callback throws, so one failed transform no longer stops history from recording.
    • A nested withNewBatch keeps the enclosing batch's split.
    • An edit no longer merges into the previous undo step just because another operation, such as a selection change, ran earlier in the same tick.
    • Inside withoutMerging, a transform's normalization stays in the same undo step as the transform, so undoing it no longer leaves an unnormalized document behind.

    editor.hasRange and editor.api.hasRange now share one implementation built on slate's hasRange, and still return false for a missing range.

  • #5190 by @dylans – Bring the bundled history plugin up to date with slate-history 0.144.0:

    • Add editor.tf.setChildren(children), which applies an outside document through operations instead of replacing editor.children, so the selection, refs and history stay valid. Each call is its own undo step, separate from typing before and after it.
    • Undo and redo now account for changes applied with editor.tf.withoutSaving. Saved steps are moved past each unsaved operation, so a block inserted above earlier typing, or text inserted before it, no longer makes undo remove the wrong characters. Steps whose content was removed, or that can no longer be applied, are dropped.
  • #5172 by @dylans – Upgrade to slate 0.142.1, slate-dom 0.142.0, slate-react 0.142.0 and slate-hyperscript 0.138.3.

  • #5190 by @dylans – Upgrade to slate 0.146.0, slate-dom 0.146.0 and slate-react 0.145.1.

  • cb4f514 by @github-actions[bot] – Updated slate, slate-dom, slate-react.

@platejs/test-utils

Published @platejs/test-utils@53.3.18.

@platejs/utils

Patch Changes

  • Updated @platejs/core, @platejs/slate.

platejs

Patch Changes

  • Updated @platejs/core, @platejs/slate, @platejs/utils.

Contributors

Thanks to everyone who contributed to this release:

@dylans, @ybai08

Full changelog: v53.3.17...v53.3.18

Don't miss a new plate release

NewReleases is sending notifications on new releases.