I think that this might be possible to do with the fck editor implementation in HTML Editor but it is not a feature that we support or make use of in the tool. I did some quick searching on google for 'fck editor get cursor position' and found some posts that seem to similar to the question you are asking and there seems to be some good responses there. I would suggest doing some searches on the fck sites to get an idea and example of how this could be done. From what I have read this is all done with client side javascript.