This is a migrated thread and some comments may be shown as answers.

Pasting of ImageData

5 Answers 124 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Oliver Weichhold
Top achievements
Rank 1
Oliver Weichhold asked on 26 Mar 2011, 06:00 PM
The standard WPF Richtextbox supports pasting of ImageData. Is there a way to get this working with the RadRichTextBox?

5 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 30 Mar 2011, 04:18 PM
Hi Oliver Weichhold,

Copying and pasting of rich text from external sources, such as a RadRichTextBox in another window, MS Word 2007 or Visual Studio for example is supported. This includes images.
In order to get it working, however, you would have to add a reference to Telerik.Windows.Documents.FormatProviders.Rtf, because the clipboard uses RTF serialization and deserialization. In the next minor release we will add HTML pasting also.
Additionally, pasting of raw image data from the clipboard is currently unavailable, but we have scheduled it for the next minor release (SP1).
If this does not answer your question, do not hesitate to contact us again.

Greetings,
Iva
the Telerik team
0
Oliver Weichhold
Top achievements
Rank 1
answered on 30 Mar 2011, 08:43 PM
Thanks for the update Iva. Will the upcoming support for pasting raw image data also apply to the Silverlight Version of the RadRichTextBox and if yes, is there a time frame for this?
0
Ivailo Karamanolev
Telerik team
answered on 01 Apr 2011, 10:30 AM
Hi Oliver Weichhold,

The Silverlight framework itself only supports plain text clipboard. Therefore it is not possible for that feature to be implemented. If, at some point, a new version of Silverlight is released that allows access to other clipboard formats, we will support them.

Best wishes,
Ivailo
the Telerik team
0
Geoff
Top achievements
Rank 1
answered on 17 Nov 2011, 07:44 AM
Hi Iva

I am using SP1 but am still having difficulty with pasting HTML.  Images do not come through at all and some formatting does not come through correctly.  I have a reference to Telerik.Windows.Documents.FormatProviders.Html, and in fact am using HTML to store the data in the DB.

I also have a reference to Telerik.Windows.Documents.FormatProviders.Rtf.

Thanks 

Geoff
0
Iva Toteva
Telerik team
answered on 22 Nov 2011, 11:17 AM
Hello Geoff,

Could you give us a sample HTML that is not being pasted correctly, so we can test it on our end.
You can get the HTML from the clipboard in the following way:

string clipboardContent = (string)Clipboard.GetData(DataFormats.Html);

You can get the content of the clipboard that is kept as RTF in the same way.
Looking forward to your reply.

Regards,
Iva Toteva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Oliver Weichhold
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Oliver Weichhold
Top achievements
Rank 1
Ivailo Karamanolev
Telerik team
Geoff
Top achievements
Rank 1
Share this question
or