mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 10:29:48 +02:00
update changelog
This commit is contained in:
@@ -38,7 +38,7 @@ const range = document.createRange({
|
||||
focus: {
|
||||
key: 'a',
|
||||
offset: 4,
|
||||
}
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
@@ -57,6 +57,8 @@ const anchor = document.createPoint({
|
||||
|
||||
**The `Range.focus` method was removed. (Not `Change.focus`!)** This was necessary to make way for the new `range.focus` point property. Usually this would have been done in a migration-friendly way like the rest of the method changes in this release, but this was an exception. However the `change.focus()` method is still available and works as expected.
|
||||
|
||||
**`Range.set` and `Range.merge` are dangerous.** If you were previously using the super low-level Immutable.js methods `range.set` or `range.merge` with any of the now-removed properties of ranges, these invocations will fail. Instead, you should use the `range.set*` helpers going forward which can be migrated with deprecations warnings instead of failing outright.
|
||||
|
||||
**The `Range.toJSON()` structure has changed.** With the introduction of points, the range now returns its `anchor` and `focus` properties as nested point JSON objects instead of directly as properties. For example:
|
||||
|
||||
```json
|
||||
@@ -72,10 +74,10 @@ const anchor = document.createPoint({
|
||||
"object": "point",
|
||||
"key": "a",
|
||||
"offset": 3,
|
||||
"path": [0, 0],
|
||||
"path": [0, 0]
|
||||
},
|
||||
"isFocused": false,
|
||||
"isAtomic": false,
|
||||
"isFocused": false,
|
||||
"marks": []
|
||||
}
|
||||
```
|
||||
@@ -237,7 +239,6 @@ moveToStartOf -> moveToStartOfNode
|
||||
selectAll -> moveToRangeOfDocument
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
### `0.36.0` — July 27, 2018
|
||||
|
Reference in New Issue
Block a user