Releases: ianstormtaylor/slate
slate-react@0.62.1
Patch Changes
-
#4118
6a137633Thanks @kamilkazmierczak! - Improved detection of legacy browsers that don't have properbeforeinputsupport. -
#4190
ea2eefefThanks @juliankrispel! - Added arenderPlaceholderprop to the<Editable>component for customizing how placeholders are rendered. -
#4157
de5cc7e5Thanks @githoniel! - Fixed a bug when syncing the selection for IME-based editing. -
#4158
ea6dc089Thanks @githoniel! - Fixed a bug that resulted in doubly-input characters when using an IME. -
#4211
1c32b97dThanks @clauderic! - Collapse expanded selection before handlingmoveWordBackward(alt + left) andmoveWordForward(alt + right) hotkeys. -
#4219
737aaa9cThanks @juliankrispel! - Fixes error that occurs when Editor is rendered inside iframe
v0.61.3
v0.61.3
0.19.0
BREAKING CHANGES
- The
filterDescendantsandfindDescendantsmethods are now depth-first. This shouldn't affect almost anyone, since they are usually not the best things to be using for performance reasons. If you happen to have a very specific use case that needs breadth-first, (or even likely something better), you'll need to implement it yourself.
DEPRECATION CHANGES
- Some
Nodemethods have been deprecated! There were a few methods that had been added over time that were either poorly named that have been deprecated and renamed, and a handful of methods that are no longer useful for the core library that have been deprecated. Here's a full list:areDescendantSorted->areDescendantsSortedgetHighestChild->getFurthestAncestorgetHighestOnlyChildParent->getFurthestOnlyChildAncestorconcatChildrendecorateTextsfilterDescendantsDeepfindDescendantDeepgetChildrenBetweengetChildrenBetweenIncludingisInlineSplitAtRange
0.18.0
BREAKING CHANGES
- The
plugin.renderproperty is now calledplugin.renderPortal. This is to make way for the newplugin.renderproperty that offers HOC-like behavior, so that plugins can augment the editor however they choose.
0.17.0
DEPRECATION CHANGES
-
Some
Selectionmethods have been deprecated! Previously there were many inconsistencies in the naming and handling of selection changes. This has all been cleaned up, but in the process some methods have been deprecated. Here is a full list of the deprecated methods and their new alternatives:moveToOffsets->moveOffsetsTomoveForward->movemoveBackward->movemoveAnchorOffset->moveAnchormoveFocusOffset->moveFocusmoveStartOffset->moveStartmoveEndOffset->moveEndextendForward->extendextendBackward->extendunset->deselect
-
Some selection transforms have been deprecated! Along with the methods, the selection-based transforms have also been refactored, resulting in deprecations. Here is a full list of the deprecated transforms and their new alternatives:
moveTo->selectmoveToOffsets->moveOffsetsTomoveForward->movemoveBackward->movemoveStartOffset->moveStartmoveEndOffset->moveEndextendForward->extendextendBackward->extendflipSelection->flipunsetSelection->deselectunsetMarks
0.16.0
BREAKING CHANGES
- Inline nodes are now always surrounded by text nodes. Previously this behavior only occured for inline nodes with
isVoid: true. Now, all inline nodes will always be surrounded by text nodes. If text nodes don't exist, empty ones will be created. This allows for more consistent behavior across Slate, and parity with other editing experiences.
0.15.0
BREAKING CHANGES
- The unique
keygenerated values have changed. Previously, Slate generated unique keys that looked like'9dk3'. But they were not very conflict-resistant. Now the keys are simple string of auto-incrementing numbers, like'0','1','2'. This makes more clear that keys are simply a convenient way to uniquely reference nodes in the short-term lifespan of a single in-memory instance of Slate. They are not designed to be used for long-term uniqueness. A newsetKeyGeneratorfunction has been exported that allows you to pass in your own key generating mechanism if you want to ensure uniqueness. - The
Rawserializer doesn't preserve keys by default. Previously, theRawserializer would omit keys when passed theterse: trueoption, but preserve them without it. Now it will always omit keys, unless you pass the newpreserveKeys: trueoption. This better reflects that keys are temporary, in-memory IDs. - Operations on the document now update the selection when needed. This won't affect you unless you were doing some very specific things with transforms and updating selections. Overall, this makes it much easier to write transforms, since in most cases, the underlying operations will update the selection as you would expect without you doing anything.
DEPRECATION CHANGES
- Node accessor methods no longer accept being passed another node! Previously, node accessor methods like
node.getParentcould be passed either akeystring or anodeobject. For performance reasons, passing in anodeobject is being deprecated. So if you have any calls that look like:node.getParent(descendant), they will now need to be written asnode.getParent(descendant.key). They will throw a warning for now, and will throw an error in a later version of Slate.
0.14.0
BREAKING CHANGES
- The
undoandredotransforms need to be applied! Previously,undoandredowere special cased such that they did not require an.apply()call, and instead would return a newStatedirectly. Now this is no longer the case, and they are just like every other transform. - Transforms are no longer exposed on
StateorNode. The transforms API has been completely refactored to be built up of "operations" for collaborative editing support. As part of this refactor, the transforms are now only available via thestate.transform()API, and aren't exposed on theStateorNodeobjects as they were before. Transformobjects are now mutable. PreviouslyTransformwas an Immutable.jsRecord, but now it is a simple constructor. This is because transforms are inherently mutating their representation of a state, but this decision is up for discussion.- The selection can now be "unset". Previously, a selection could never be in an "unset" state where the
anchorKeyorfocusKeywas null. This is no longer technically true, although this shouldn't really affect anyone in practice.
0.13.0
BREAKING CHANGES
- The
renderNodeandrenderMarkproperties are gone! Previously, rendering nodes and marks happened via these two properties of the<Editor>, but this has been replaced by the newschemaproperty. Check out the updated examples to see how to define a schema! There's a good chance this eliminates extra code for most use cases! 😄 - The
renderDecorationsproperty is gone! Decoration rendering has also been replaced by the newschemaproperty of the<Editor>.
0.12.0
BREAKING CHANGES
- The
data.filesproperty is now anArray. Previously it was a nativeFileListobject, but needed to be changed to add full support for pasting an dropping files in all browsers. This shouldn't affect you unless you were specifically depending on it being array-like instead of a trueArray.