Completed
Last Updated: 28 Dec 2018 10:31 by ADMIN
ADMIN
Rumen
Created on: 11 Jan 2018 08:15
Category: Editor
Type: Bug Report
3
Paste with Ctrl-V into RadEditor pastes content twice in IE when EnableComments and EnableTrackChanges are enabled
When EnableComments is set to true, the content from the clipboard is pasted twice in an empty editor.

RadEditor Configuration:

<telerik:RadEditor runat="server"
    EnableComments="true">
    <Tools>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="Bold" />
            <telerik:EditorTool Name="Italic" />
            <telerik:EditorTool Name="Underline" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="Undo" />
            <telerik:EditorTool Name="Redo" />
            <telerik:EditorTool Name="Cut" />
            <telerik:EditorTool Name="Copy" />
            <telerik:EditorTool Name="Paste" />
            <telerik:EditorTool Name="PastePlainText" Text="Paste Plain Text" />
            <telerik:EditorTool Name="FindAndReplace" Text="Find and Replace" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="Indent" />
            <telerik:EditorTool Name="Outdent" />
            <telerik:EditorTool Name="InsertOrderedList" Text="Numbered List" />
            <telerik:EditorTool Name="InsertUnorderedList" Text="Bulleted List" />
            <telerik:EditorTool Name="LinkManager" />
            <telerik:EditorTool Name="Unlink" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="AjaxSpellCheck" Text="Spell Check" />
            <telerik:EditorTool Name="InsertSymbol" Text="Insert Symbol" />
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="AcceptTrackChange" Text="Accept Change" />
            <telerik:EditorTool Name="RejectTrackChange" Text="Reject Change" />
            <telerik:EditorTool Name="AcceptAllTrackChanges" Text="Accept All Changes" />
            <telerik:EditorTool Name="RejectAllTrackChanges" Text="Reject All Changes" />
            <telerik:EditorTool Name="EnableTrackChangesOverride" Text="Track Changes" />
            <telerik:EditorTool Name="AddComment" Text="Add Comment" />
            <telerik:EditorTool Name="RemoveComment" Text="Remove Comment" />
            <telerik:EditorTool Name="RemoveAllComments" Text="Remove All Comments" />
            <telerik:EditorTool Name="ImageManager" Text="Insert Image" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>
Potential workaround:
<script type="text/javascript">
    function OnClientPasteHtml(sender, args) {
        var commandName = args.get_commandName();
        var value = args.get_value();
 
        if (commandName == "Paste" && Telerik.Web.Browser.ie) {
            args.set_value(value);
            args.set_cancel(true);
        }
    }
</script>
<telerik:RadEditor runat="server" Height="300px" StripFormattingOptions="Span,Font,Css" EnableTrackChanges="true" OnClientPasteHtml="OnClientPasteHtml"
    ContentFilters="FixEnclosingP,RemoveScripts,FixUlBoldItalic,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent,EncodeScripts,OptimizeSpans,ConvertTags,StripCssExpressions,RemoveExtraBreaks"
    EnableComments="true" NewLineMode="P" EditModes="Design,Html">
</telerik:RadEditor>
2 comments
ADMIN
Marin Bratanov
Posted on: 28 Dec 2018 10:31
Hi Nilesh,

This fix will be available in the R1 2019 release that is planned for mid-January.

I've also updated the top commend with a potential workaround that you can try.


Regards,
Marin Bratanov
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.
Nilesh
Posted on: 27 Dec 2018 22:30

I am also facing the same issue. Can you please let me know what is the resolution for this.

 

Thanks,

Nilesh.