I am trying to use the following command to insert a text to the CKEditor:
CKEDITOR.instances.Body.insertText('$${FIRSTNAME}');
The above command works fine when the cursor is at plain text. When i try to insert the text between a text which has attribute, it inserts on single $ instead of $$ of $${FIRSTNAME}. I have uploaded the sample to the jsbin to reproduce the issue
Please suggest an alternative to fix this issue.