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

Cant Paste in Rich Text Editor

3 Answers 593 Views
RichTextEditor
This is a migrated thread and some comments may be shown as answers.
Romel
Top achievements
Rank 1
Romel asked on 23 Jul 2019, 03:47 PM

Hi all, 

I just encountered the most bizarre thing today while using the Rich Text Editor. I upgraded our Telerik DLLs to the most recent one available (2019 R2, 2019.2.618) and it seems like the ability to paste into the Rich Text Editor has been lost all of a sudden. I tried all I could and looked around the forums a bit to no avail. The interesting thing is that when I debug, I can "hit" the CommandExecuting event and I can see that in the code it recognizes that it is a paste command, but the text is not being pasted onto the textbox. 

 private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
        {
            if (e.Command is PasteCommand)
            {
                //the event is fired and recognizes that IT IS  a PASTE COMMAND, but text is not being pasted onto the textbox
            }
        }

 

Has anyone else encountered this before. If so, can anyone point me to the right direction as to why this is happening? Thanks all.

 

Romel

3 Answers, 1 is accepted

Sort by
0
Romel
Top achievements
Rank 1
answered on 29 Jul 2019, 03:24 PM

OK, this is really weird. It seems like I can write/type inside the RichTextEditor and copy/paste inside it without any problems. However, when I copy text from any other source such as my browser, or WORD or notepad, it will not paste the text onto to the textbox. Again, when I debug, I can hit the CommandExecuting event and it recognizes that it is a Paste Command via 

if (e.Command is PasteCommand)
            {
                //the event is fired and recognizes that IT IS  a PASTE COMMAND, but text is not being pasted onto the textbox
            }

but nothing gets pasted onto the textbox.

I need this feature in the RichTextEditor for my users and all I did was update our Telerik to the latest version. Is there a way to revert back if we need to?

Thanks.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Jul 2019, 08:44 AM
Hello, Romel,   

RadRichTextEditor does support copy/paste operations from external resources like MS Word. It takes advantage of the clipboard support in Win Forms. As the clipboard keeps content in several formats, it is possible to choose which input to use and further customize the way the text will look when pasted. Additional information about the different options that clipboard operations offer is available in the following help article: https://docs.telerik.com/devtools/winforms/controls/richtexteditor/features/clipboard-support 

I have tested copying a simple text from MS Word and pasting it in the RadRichTextEditor control in the Demo application >> RichTextEditor >> First Look example. It works as expected on my end with the latest official version. It seems that there is something specific on your end that prevents the paste operation.

Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.
 
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Romel
Top achievements
Rank 1
answered on 31 Jul 2019, 06:58 PM

Hi Dess,

Thank you for the reply. The issue WAS specific on my end. I decided to share it here for those who may experience the same issue I had. 

The problem was located in my program's entry point method. For some odd reason, after we upgraded our Telerik DLLs to the newer version, the [STAThread] attribute in the program's entry point (Program.cs) method got commented out. I am not sure how that happened but right after uncommenting, the RadRichTextEditor was pasting again with no issues.  =)

Anyways, thanks for the help and I sure hope this saves someone else the future headaches.... =) Take care.

 

Romel

Tags
RichTextEditor
Asked by
Romel
Top achievements
Rank 1
Answers by
Romel
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or