Cursor Position for New Rich Text Element

What did you try?

it does return an object that should have the info you need. See the docs and follow the links to see the properties of the object.

Also check that you are getting the right window, see Upload a file to Xano with custom JavaScript - WeWeb error - #10 by dorilama