Click to See Complete Forum and Search --> : Pasting text from webpage to RichTextBox


SomE
April 18th, 2008, 07:30 AM
When you paste text from webpage to RTB, it loses it's formatting: font style, font size, bold/italic...
Is there a way to fix this?

I'm trying to catch Ctrl ^ v and extract the format data from Clipboard. But all I can google is posts doing the reverse of that (only allowing plain text in rtb).
Please help.


Edit: Ok, after a very long google run, I found out RTB doesn't support html format. I came across DHTML Control - DHTMLEdit: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=213197&SiteID=1

The control ok, except it's lacking basic rtb features: BorderStyle, ScrollToCaret...
So my new question: Is there a way to combine a DHTML and RTB? I'm new to overriding.

jasonli
May 1st, 2008, 10:45 AM
Although DHTMLEdit has no ScrollToCaret property, you can try this:DHTMLEdit.Select(DHTMLEdit.Text.Length, 1)

Hope it helps.