RadEditor - commandName is undefined on client paste

2 posts, 0 answers
  1. Steeve
    Steeve avatar
    17 posts
    Member since:
    Mar 2011

    Posted 28 Jan 2015 Link to this post

    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
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 02 Feb 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top