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

Cannot right click and paste

2 Answers 65 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 2
Joshua asked on 12 Sep 2019, 11:32 AM

I am getting complains from our customers that they cannot right click and paste into the Editor tool. I tested this in IE11, Chrome, and Firefox. The only one that could do a right-click and paste was Chrome. The other browsers, you have to Ctrl+V.

 

Is there a fix for this?

 

Here is my code for the editor:

@(Html.Kendo().EditorFor(o => o.Content)
.Encoded(false)
.Resizable(true)
.Tools(tools => tools
.Clear()
.Bold()
.Italic()
.Underline()
.Strikethrough()
.JustifyCenter()
.JustifyFull()
.JustifyLeft()
.JustifyRight()
.InsertUnorderedList()
.InsertOrderedList()
.Indent()
.Outdent()
.CreateLink()
.Unlink()
.TableEditing()
.Formatting()
.CleanFormatting()
.FontName()
.FontSize()
.ForeColor()
.BackColor()))

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 17 Sep 2019, 09:14 AM

Hello Joshua,

A change has been introduced with the following GitHub issue that modified the body height of the Editor in order to correctly resolve content scrolling in multiple scenarios. There are also 3 other related issues that are linked in the above item which resulted in the mentioned change of the body height. With it, pasting the content through the browser context menu could be achieved by clicking on the upper part of the body when there is no content in the Editor.

To workaround the above, you could inject a simple style in the Editor <head> element after initialization as follows:

<script>              
  $(document).ready(function() {                    
    var editor = $("#editor").kendoEditor({ resizable: {
      content: true,
      toolbar: true
    }}).getKendoEditor();
                  
                  
    $(editor.body).prev().append("<style>body { padding:0;margin:0;height:100%;min-height:100%; }</style>")
  });
</script>

Here is a Dojo example that demonstrates the above. However, please note that applying this change might result in issues with the following item.

We will also add a Knowledge Base Article with the above workaround for the browser context menu.

I hope this helps.

Regards,
Dimitar
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
Joshua
Top achievements
Rank 2
answered on 19 Sep 2019, 06:16 PM

Dimitar,

Thank you! This snippet of code worked perfectly for me. I will keep an eye out for the other issue related to this workaround. I appreciate the support!

Tags
Editor
Asked by
Joshua
Top achievements
Rank 2
Answers by
Dimitar
Telerik team
Joshua
Top achievements
Rank 2
Share this question
or