Add <br/> to webbrowser on return...
I have a WebBrowser control added to my form, which I am allowing users to create custom html email templates. The problem I have is that when you with the 'Return' key, the cursor jumps what looks like 2 lines. I've looked at the HTML behind it and it seems to add a <p> (Paragraph) item each time, whereas I would like a line break <br/> to be using when the return key is pressed.
I have looked around and am unable to find anything. Could someone help me to to override the KeyPress event on the WebBrowser and for a <br/> to be used instead of <p>. I know that the WebBrowser does not have a KeyPress event, hence I need some help on how to capture key presses.
Thanks in advance
Simon
Re: Add <br/> to webbrowser on return...
How is the html being generated for the WebBrowser? Are you using a tool found on the internet or are you using a textbox?
Re: Add <br/> to webbrowser on return...
Typically, depending on what you're using, the Enter is "next paragraph" in which case the <p></p> is semantically correct. The Ctrl-Enter though creates a break, which is what you're after.
But it depends on what you're using to generate the HTML in the first place... the webbrowser doesn't create HTML... it consumes it and renders it.
-tg