@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
-
- Apply
allowedNodes,disallowedNodesandallowNodeto the children of bold, italic and strikethrough, sodisallowedNodes: ['a']also removes a link inside**…**. AnallowedNodeslist now needstext, and any inline type such asa, listed to keep that content inside these marks, as it already does outside them.
- Apply
-
- Keep HTML that has no rule as source: unknown tags, raw
htmlnodes and HTML comments deserialize as a text leaf withrawHtml: trueand 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.
- Keep HTML that has no rule as source: unknown tags, raw
-
- Deserialize reference links and images (
[text][id],[id][],[id],![alt][id]) asaandimgnodes using the matching definition's URL. They were dropped before, so a paragraph holding only a reference link came back empty.
- Deserialize reference links and images (
-
- 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.
- Stop serializing the empty text around inline elements (links, mentions, footnote references) as a zero-width space. Only an empty paragraph is written as
@platejs/slate
Patch Changes
-
#5172 by @dylans – Bring the bundled history plugin up to date with slate-history:
withoutSaving,withoutMerging,withMergingandwithNewBatchrestore their flags when the callback throws, so one failed transform no longer stops history from recording.- A nested
withNewBatchkeeps 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.hasRangeandeditor.api.hasRangenow share one implementation built on slate'shasRange, and still returnfalsefor 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 replacingeditor.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.
- Add
-
#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.
-
cb4f514by @github-actions[bot] – Updatedslate,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:
Full changelog: v53.3.17...v53.3.18