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

4 posts, 0 answers
  1. Dhavalesh
    Dhavalesh avatar
    1 posts
    Member since:
    Aug 2011

    Posted 16 Aug 2011 Link to this post

    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.  
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 18 Aug 2011 Link to this post

    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 >>

  3. Mahesh
    Mahesh avatar
    6 posts
    Member since:
    Aug 2008

    Posted 21 Sep 2011 Link to this post

    Hi

    I am also looking for a solution for the item 1. Do you know whether MSFT is going to fix this.
    thanks
    mahesh
  4. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 22 Sep 2011 Link to this post

    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 >>

Back to Top