I'm programming a spell checker in Javascript in combination with OpenOffice dictionary, and I have a serious problem.
I can find whole words using RegEx, but if the word looks like prog<b>ram</b>ing
, I can find it if I remove all html tags with the .text()
method from jQuery. But how can I replace this word and rebuild the original html structure?
Spellchecker.com does it very smartly - the spell check recognizes even words like prog<b>ram</b>ing
if they are misspelled!