slate v0.44.0 Release Notes
Release Date: 2018-11-08 // over 5 years ago-
NEW
Introducing the
child_min_invalid
andchild_max_invalid
schema errors. These new schema errors map directly to themix
andmax
schema rule definitions, and make it easier to determine exactly what your normalization logic needs to do to fix the document.➕ Added new node retrieval methods. There are three new methdos for node retrieval. The first is
getNodesAtRange
which will retrieve all of the nodes in the tree in a given range. And the second two aregetRootBlocksAtRange
andgetRootInlinesAtRange
for retrieving the top-most blocks or inlines in a given range. These should be helpful in defining your own command logic.BREAKING
Schema errors for
min
andmax
rules have changed. Previously they would result in errors ofchild_required
,child_object_invalid
,child_type_invalid
andchild_unknown
. Now that we have the newchild_min_invalid
andchild_max_invalid
errors, these schema rules will return them instead, making it much easier to determine exactly which rule is causing a schema error.🗄 ###### DEPRECATED
The
getBlocksAtRange
andgetInlinesAtRange
methods have been renamed. To clear up confusion about which blocks and inlines are retrieve in the case of nesting, these two methods have been renamed togetLeafBlocksAtRange
andgetLeafInlinesAtRange
to clarify that they retrieve the bottom-most nodes. And now there are two additional methods calledgetRootBlocksAtRange
andgetRootInlinesAtRange
for cases where you want the top-most nodes instead.