0

[enter link description here][1]First of all - let me make it clear that I am very new to angular. Please pardon me if you find something stupid.

Objective - I am trying to make a custom spell checker. In that I want the ziggy redline when ever a user will press a space bar(in case the spelling is wrong). Here in the program I just used one word just to make sure red underline is coming.

Problem - after hitting the space redline appears but the cursor goes back at the starting of the word.

My Approach - Wheneever there is a spelling mistake i put that word in a span. Now, in that span I will continously raise event on every Keyup to check the spelling, reason being is that if the user puts space between the word thats inside a span I will create two spans removing the already existing span.

  [http://plnkr.co/edit/W1qMrTHxksBShYsJeXdl?p=preview]
Bose_geek
  • 498
  • 5
  • 18
  • sounds more like you need to add another step after creating the spans that repositions the cursor -- check this SO -- http://stackoverflow.com/questions/512528/set-cursor-position-in-html-textbox – beauXjames Oct 22 '14 at 13:31
  • I tried that as well but its not working for me. I need to replicate what http://www.javascriptspellcheck.com/ offers. – Bose_geek Oct 25 '14 at 13:27
  • Well, by the looks of their product, they aren't wrapping any of their text in html elements, but adding a floating image 'wiggle.png' over the text in question. – beauXjames Oct 27 '14 at 03:02

0 Answers0