Closed hdsuperman closed 3 years ago
I understand your use case, but this isn't a bug, this is by design. Setting only acts on a single node, not any of its children—this is an important quality for making OT-style collaboration viable.
@ianstormtaylor Yeah, so what process would you suggest to add new properties to a fragment with children:
I mean, I am trying to find a way to add the bold attribute to any selected/fragment children with text:
What process do you think I am missing here:
I understand your use case, but this isn't a bug, this is by design. Setting only acts on a single node, not any of its children—this is an important quality for making OT-style collaboration viable.
Hi. So no way to replace children[0].text
when Editor is loaded?
My initial value is
[
{
"type": "paragraph",
"children": [
{
"type": "company",
"children": [
{
"text": "My Company"
}
]
}
]
}
]
Each time when the Editor is loaded, I want to replace initial value of 'My Company' with the current value (e.g 'My Updated Company').
Each time when the Editor is loaded, I want to replace initial value of 'My Company' with the current value (e.g 'My Updated Company').
Have you figured out how to do it? @fedorin-git
Do you want to request a feature or report a bug?
bug
What's the current behavior?
Slate: 0.59.0 Browser: Chrome OS: Linux
What's the expected behavior?
update nested properties
current solution: