Home All Groups Group Topic Archive Search About

Customize html output of WebBrowser Control or Get Cursor Position

Author
28 Sep 2006 4:26 PM
ASP Developer
I followed the following example to create an html text editor. 

http://www.codeproject.com/useritems/editor_in_windows_forms.asp

It works great but when you press enter in the text box the control inserts
p tags instead of br tags.  So you end up with double spacing throughout the
document.  Is there any way to control what tags the browser generates or is
it possible to retrieve the cursor position?  If I could get a hold of the
cursor position I could replace the /p with <br>.   Any help would be greatly
appreciated.

Author
29 Sep 2006 1:57 AM
Dave Sexton
Hi,

I just add a stylesheet to the DOM:

p    { margin: 0; }

--
Dave Sexton

Show quote
"ASP Developer" <ASPDevelo***@discussions.microsoft.com> wrote in message news:FFE15AED-B41A-4730-92C6-6741F2BCB5F8@microsoft.com...
>I followed the following example to create an html text editor.
>
> http://www.codeproject.com/useritems/editor_in_windows_forms.asp
>
> It works great but when you press enter in the text box the control inserts
> p tags instead of br tags.  So you end up with double spacing throughout the
> document.  Is there any way to control what tags the browser generates or is
> it possible to retrieve the cursor position?  If I could get a hold of the
> cursor position I could replace the /p with <br>.   Any help would be greatly
> appreciated.

AddThis Social Bookmark Button