Can someone please help me, for I am totally lost.
I need some javascript (please no jquery) code that does the following:
After initialising the editor I want the caret to be positioned at the position of a certain textstring.
For example: I have a html document and in the html I have a string "%c%". On startup I want that particular string %c% to be replaced by the caret focus, so that when I start typing the typing starts at exactly that position. The %c% should be removed directly (or replaced by empty), so it should not stay in the document. The %c% could be anywhere in the html, so it should be flexible.
Please help me, thanks for any tips! And please, if possible help me with some ready-to-use code... I know it should be done by using ranges, but I just can't figure it out exactly.