I am succesfully able to create a selection with this small snippet:
const pos = $anchor.after(1) tr.setSelection(example.TextSelection.between(resolvedPos(pos),resolvedPos(pos + 2))
It works and I know this because when I run the code under a debugger the ResolvedPosition is what I need it to be.
The problem is the cursor on the DOM does not move to the selection. One piece of information that may be important is that the content is wrapped in this grid list structure:
<example><div class="v-card v-sheet theme--light" contenteditable="false"><div class="row" contenteditable="false"><div class="col"><h1 contenteditable="true"><span style="color: green;"><br></span></h1></div><div class="col"><h1 contenteditable="true"><span style="color: red;"><br></span></h1></div></div><div class="row" contenteditable="false"><div class="col"><h1 contenteditable="true"><span style="color: blue;">Test</span></h1></div></div></div></example>
This structure uses contenteditable = false and contenteditable = true and i’m not sure about what effects it may have on ProseMirror. For reference, scrool to the h1, this is where the content is inserted