I have a code block, which is something like
and now I add a language selector outside editor DOM, then I want to get the code block node’s pos while I’m clicking language option.
but it’s hard to get the
pos when I can only access the node’s DOM
( because my selection may not be inside the code block element when I’m clicking the language selector, so I can’t just use
state.selection to do that )
@marijn I’ll appreciate everything that you could provide for me.