views:

103

answers:

0

I am in the process of creating a simple WYSIWYG html editor to enable the users of my application to design simple html emails.

At the moment I have decided to use the web browser control with mshtml to enable me to edit what is displayed. I have a tool bar which holds all of the relevant buttons (bold, underline, etc.).

I need a way to check if the current block has any formatting so the correct state can be displayed on the buttons in the tool bar. I have tried to add an event handler to the IHTMLDocument to fire when the mouse is moved or the arrow keys are pressed, this has however stopped the web browser from taking any input.

Is there a simpler way to achieve this goal?