I am working on modifying an existing spell check plugin for TinyMCE.
This is what is supposed to happen: 1. User hits "space" and the spell check runs. 2. If the word is spelled wrong the word gets wrapped with a span and gets a red underline
what I find happening is that when the user hits space bar the word does get spell checked but the cursor pops back to the end of the word just typed (instead of to where the space is) (you can see this in action at http://mail.solidhouse.com/webmail2/test.html)
here is my pseudcode: var b = this.editor.selection.getBookmark(); //for each node node.nodeValue.replace(r5, '$1$2'); this.editor.selection.moveToBookmark(b);
what I am suspecting is that moveToBookmark keeps the cursor within the element but I have no idea what to do to remedy this.
(I have tried incrementing b.start and b.end but that did not work)
I know this is hard to explain. Any thoughts on this are greatly appreciated.