Replace nodeViews

Hey, is there a way to replace node views without destroying the whole editor view? setProps isn’t working here as expected.

// create view
const view = new EditorView(element, {
	state,
	nodeViews: {
		test: () => { … }
	},
}

// replace node views later
view.setProps({
	nodeViews: {
		test: () => { … }
	},
}

In this code example I would expect that the destroy function of all registered node views are called and the new node views are constructed.

Oh, that’s a good point. This patch should help with that.

Thanks, this is working fine!