The following code doesn't work and I see the first inserted entity only when the code is running the second time:
editor.insertInline({
key: 'XX',
data: {},
nodes: List([
Text.create({
'Hello World!',
})
]),
type: 'deletion',
})
const insertedDeletion = value.document.getInlinesByType('deletion').first()
Immediately after inserting the inline, insertedDeletion
is null. Where exactly should I check for the existence of the inline? Is there a callback?
After further investigating, I found that I need to get the value directly from the editor instance: