javascript - TinyMCE Plugin building -


i working on modifying existing spell check plugin tinymce.

this supposed happen: 1. user hits "space" , spell check runs. 2. if word spelled wrong word gets wrapped span , gets red underline

what find happening when user hits space bar word spell checked cursor pops end of word typed (instead of space is) (you can see in action @ http://mail.solidhouse.com/webmail2/test.html)

here pseudcode: var b = this.editor.selection.getbookmark(); //for each node node.nodevalue.replace(r5, '$1$2'); this.editor.selection.movetobookmark(b);

what suspecting movetobookmark keeps cursor within element have no idea remedy this.

(i have tried incrementing b.start , b.end did not work)

i know hard explain. thoughts on appreciated.

try incrementing bookmark start/end 2 instead of 1 if haven't already. since underline adds tag around mispelled words, that's additional 2 places need accounted in bookmark: 1 each side of span.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -