我正在尝试做这样的事情来更新和已经存在的节点,但是文档并不清楚。
const paht = [0,1,1,2]
const data: any = {
type: 'ref',
id: uniqid(),
data: target,
x: 'new data are here.,',
children: [{text: 'more new data'}],
}
editor.apply({
type: 'update_node_at_path',
path:path,
newProperties: {
node:data,
},
});