views:

406

answers:

2

I'm working on a WYSIWYG editor with builtin spell checker Hunspell and online highlighting of misspelled words. I'm using Webbrowser control as a html handler. It's a way easy to spell check text than html in webbrowser control, but following this way I'm losing all html formatting. So the question is: is there any way to spell check body innertext and then convert it to body innerhtml with previous formatting? (with no use of HtmlAgilityPack or Majestic12 or SgmlReader or ZetaHtmlTidy).

Thanks in advance.

+1  A: 

As opposed to checking the spelling of the innterText property of a given element, a better approach might be to loop through the child elements, and check the spelling of each child's innerText instead.

This approach, while possibly limiting context-based spell-checking, should keep the markup intact.

Note: You might want to take into consideration that each child node may also contain further children.

Bauer
A: 

Thanks for help :)

Alexander
If you wish to leave a comment, you should use the 'add comment' link. This area is meant for answers regarding the original question.
Bauer
... and, if the answer helped you, you might mark it as the right answer ...
Hinek