Minor Changes
-
#6314
64b036bThanks @dylans! - AddTransforms.setChildren(editor, children)and the overridableeditor.setChildrenmethod, which apply an outside document through Slate operations instead of replacingeditor.children. Unchanged nodes are kept, matched by identity or deep equality; shared nodes move withmove_node; and text changes becomeinsert_text/remove_text, so the selection, refs and history stay valid.withHistoryrecords eachsetChildrencall as one undo step, separate from typing before and after it.BaseEditornow requiressetChildren.createEditorsupplies it, but editors built by hand and test mocks must add it.
Patch Changes
- #6320
a21292fThanks @Marve10s! - FixEditor.positionsandTransforms.movereturning points inside consecutive non-selectable elements, or inside a non-selectable first child of a void or read-only element. Deleting beside two non-selectable blocks, or beside a read-only block whose content is all non-selectable, now removes them instead of merging their text.