I've used the location of the caps lock indicator to position the html near the caret:
Test - Find caret position via caps lock indicator.kmmacros (34.3 KB)
It needs some tuning to move the html window a little more down.
I've used the location of the caps lock indicator to position the html near the caret: