changing css of focused element in iframe

changing css of focused element in iframe

I am inserting html into an iframe via the execCommand().

Say for example I insert a table, the cursor will then be active in one of the cells.

How do I capture the "$(this) of the focused cell and store it in a var so I can later change the css of it?

 I only seem to be able to find the iframe as being focused.