Inside your dispatchTransaction handler, check for tr.selectionSet, e.g.:
pm = new EditorView(domElement, {
dispatchTransaction: tr => {
if (tr.selectionSet) {
// do your thing
}
})
Inside your dispatchTransaction handler, check for tr.selectionSet, e.g.:
pm = new EditorView(domElement, {
dispatchTransaction: tr => {
if (tr.selectionSet) {
// do your thing
}
})