I’m getting Uncaught TypeError: Cannot read property ‘docView’ of undefined when i write this: `
const dom = domAtPos(position);
the error is pointing the line with the return statement in the domAtPos function
const { state, dispatch, docView, domAtPos } = view; EditorView.prototype.domAtPos = function domAtPos (pos, side) { if ( side === void 0 ) side = 0; return this.docView.domFromPos(pos, side) };
I have also tried to write
const dom = docView.domFromPos(position);
but the error Uncaught TypeError: Cannot read property ‘contentDOM’ of undefined rises and it’s pointing to the first line of the domFromPos function
ViewDesc.prototype.domFromPos = function domFromPos (pos, side) { if (!this.contentDOM) { return {node: this.dom, offset: 0} } ....