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

RadEditor - commandName is undefined on client paste

1 Answer 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Steeve
Top achievements
Rank 1
Steeve asked on 28 Jan 2015, 08:03 PM
Hi,
I' working with the version 2014.2.724.45 and our standard is IE9 and I have problems with the clientPasteHtml.  My test page is very simple:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikRadEditorPaste.Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">
            function onClientPasteHtml(editor, args) {
                var commandName = args.get_commandName();
                if (commandName == "Paste") {
                    alert('OK --> CommandName = ' + commandName);
                } else {
                    alert('NOT OK --> CommandName = ' + commandName);
                }
            }
        </script>
         
        <asp:ScriptManager runat="server"></asp:ScriptManager>
 
        <telerik:RadEditor ID="radEditorMandate" runat="server" Width="856px" Height="590px" StripFormattingOptions="NoneSupressCleanMessage, ConvertWordLists, MSWordNoMargins" OnClientPasteHtml="onClientPasteHtml">
            <ContextMenus>
                <telerik:EditorContextMenu TagName="*">
                    <telerik:EditorTool Name="Paste" />
                </telerik:EditorContextMenu>
            </ContextMenus>
            <Tools>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Paste" />                   
                </telerik:EditorToolGroup>
            </Tools>
            <CssFiles>
                <telerik:EditorCssFile Value="~/RadEditor.css" />
            </CssFiles>
        </telerik:RadEditor>
    </form>
</body>
</html>

If we use the keyboard to paste text (ctrl+v), the command name is OK (Paste), but if we use the toolbar or the context menu, the command name is not OK (undefined)

Could you help to solve this problem??

I tested with IE11 and I meet the same behavior.

Thank you and have a nice day.

Steeve

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 02 Feb 2015, 11:54 AM
Hi Steeve,

Thank you for contacting Telerik support.

The described issue is an already logged bug. I suggested following further progress n the matter via this feedback portal item. Also, you can temporarily handle the bug with the suggested workaround. 

Let me know if you need further help on the matter.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Editor
Asked by
Steeve
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or