Thanks.

But it still seems that a visual cursor in a read only editor is the way to fit my requirement. I know Java can do it.