I think I must be missing something obvious here. I can’t find a way to get the text in a TextMarker object or its location/position (the from
and to
properties). I need to know the text in a TextMarker in order to know if I should .clear()
it. Where in the object can I find this information?
editor.getRange(marker.from, marker.to)
should get your the text. If by location you mean the screen coordinates, you want the charCoords
method.
When I try marker.from I get undefined
. Note: attrs
, tag
, pageID
, and title
are supposed to be there. I added those. I didn’t delete anything though. They’re how I’m handling some of the missing information right now.
If your TextMarker output looks different, maybe you can show me a pic so I can see the difference.
Ah, right, you should call .find()
to get the position.
Thanks! Sorry I missed that.