我怎样才能得到新插入的内联的兄弟姐妹?

How can I get the siblings of a newly inserted inline?

以下代码不起作用,只有当代码第二次为 运行 时,我才看到第一个插入的实体:

editor.insertInline({
  key: 'XX',
  data: {},
  nodes: List([
    Text.create({
      'Hello World!',
    })
  ]),
  type: 'deletion',
})

const insertedDeletion = value.document.getInlinesByType('deletion').first()

插入内联后,insertedDeletion 立即为 null。我到底应该在哪里检查内联的存在?有回调吗?

进一步研究后发现需要直接从编辑器实例中获取值:

const insertedDeletion = editor.value.document.getInlinesByType('deletion').first()