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

Not retaining formatting in the editor If we copy and paste MS word

3 Answers 83 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dhavalesh
Top achievements
Rank 1
Dhavalesh asked on 16 Aug 2011, 11:49 AM
Hello

#1: When we copy paste the content from MS Word, editor is not retaining formatting in the editor. Could you please let me know what might be the problem.
#2. How to handle the cursor position.
#3. If we can have close button in the menu, can we close the document in the control.  

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 18 Aug 2011, 06:33 PM
Hello Dhavalesh,

I'll get straight to your questions:
#1 Rich text copy/paste can only be done in one document or between two instances of RadRichTextBox in the same application. This is a limitation of Silverlight's clipboard, which we can do nothing about. Rich text copy/paste works correctly with the WPF version of the control, because the framework allows it.
#2 The current position of the caret can be obtained like this:

DocumentPosition caret = this.radRichTextBox.Document.CaretPosition;
More information on DocumentPositions can be found here.
#3 RadRichTextBox always shows a Document. However, depending on the behavior you wish to achieve, you can follow one of the following approaches:
   1. Set the Width and Height of the control to 0 or the visibility of the control to Collapsed/Hidden.
   2. If you are using RadRichTextBoxRibbonUI or some other UI bound to commands of the editor, you can assign a new empty document to the editor and set the IsReadOnly property to true. Thus, all UI commands will be disabled, except for the save document command. You can bind the button to a custom command instead of the default SaveCommand. The same goes for the OpenDocumentCommand, which will be disabled by the fact that the rich text box is read only.

Regards,
Iva
the Telerik team

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

0
Mahesh
Top achievements
Rank 1
answered on 21 Sep 2011, 08:53 PM
Hi

I am also looking for a solution for the item 1. Do you know whether MSFT is going to fix this.
thanks
mahesh
0
Iva Toteva
Telerik team
answered on 22 Sep 2011, 01:33 PM
Hello Mahesh,
The clipboard support most probably
won't be extended even in Silverlight 5; so you should probably address your question to Microsoft directly. What I have found after a quick research are these two feature suggestions on .NET user voice:
Regards,
Iva
the Telerik team

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

Tags
General Discussions
Asked by
Dhavalesh
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Mahesh
Top achievements
Rank 1
Share this question
or