Say I have the following text:
this is some example c|ode
The pipe symbol is where the cursor is in a nicEditor div. nicEditor has a function to get the position of the cursor "getRng()".
However getRng() doesn't get the position of the cursor including HTML, and as far as I can see no such function exists (correct me if I'm wrong).
The code in the nicEditor div might actually be:
<span style='font-weig|ht: bold;'>this i</span>s some example code
You can see my problem. I'm trying to insert something into the nicEditor div and it gets inserted into the middle of a HTML tag.
My question is this: Is there a way to convert the position of the cursor with the HTML tags included? Or is there any other alternative solution?