mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 03:32:36 +02:00
Include data and type when converting set_annotation to JS (#3085)
These were missing, and `set_annotation` operations don't have marks. This meant that when converting these operations to JS and back, they could not become real annotations again.
This commit is contained in:
committed by
Ian Storm Taylor
parent
88b7efa975
commit
3635390820
@@ -278,7 +278,8 @@ class Operation extends Record(DEFAULTS) {
|
|||||||
if ('anchor' in value) v.anchor = value.anchor.toJS()
|
if ('anchor' in value) v.anchor = value.anchor.toJS()
|
||||||
if ('focus' in value) v.focus = value.focus.toJS()
|
if ('focus' in value) v.focus = value.focus.toJS()
|
||||||
if ('key' in value) v.key = value.key
|
if ('key' in value) v.key = value.key
|
||||||
if ('mark' in value) v.mark = value.mark.toJS()
|
if ('data' in value) v.data = value.data.toJS()
|
||||||
|
if ('type' in value) v.type = value.type
|
||||||
value = v
|
value = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user