Aleksandr Nikiforov
Aleksandr Nikiforov

Reputation: 174

Coordinates of specific text fragment in text node

Is it possible to get bounding rect of specific text fragment inside text node?

Say I have this HTML <p> Word1 word2 word3 word4 </p>

and I'd like to know bounding rect of word3.

Upvotes: 0

Views: 76

Answers (1)

miguel-svq
miguel-svq

Reputation: 2176

Not directly, but you could span the word and get that span bounding box.

Upvotes: 1

Related Questions