So with the Prosemirror state on the backend, we would generally write a transaction like this…
function addThewordSample(state) {
const transaction = state.tr.insertText('sample',10, 20);
return state.applyTransaction(transaction)
}
Once we have converted to a ydoc
this kind of logic appears to have to change. Has anyone managed to apply a prosemirror transaction like this using the ydoc
?
function addThewordSample(ydoc??) {
const transaction = state.tr.insertText('sample',10, 20);
return state.applyTransaction(transaction)
}
Thanks for any help here…