I have been working on a better solution. The problem with the above method was the behavior was drastically different in each browser.
I have created a pure JavaScript solution that works cross browser within a TextArea.
How can I get a handle of the TextArea within the CuteEditor?