in src/plugin/fieldViews/AttributeFieldView.ts [60:73]
protected updateOuterEditor(fields: Value) {
const outerTr = this.outerView.state.tr;
// When we insert content, we must offset to account for a few things:
// - getPos() returns the position directly before the parent node (+1)
const contentOffset = 1;
const nodePos = this.getPos() + this.offset + contentOffset;
outerTr.setNodeMarkup(nodePos, undefined, {
fields,
});
const shouldUpdateOuter = outerTr.docChanged;
if (shouldUpdateOuter) this.outerView.dispatch(outerTr);
}