Copy And Paste Issue in FireFox on MAC

2 posts, 0 answers
  1. Abhinandan Bansal
    Abhinandan Bansal avatar
    17 posts
    Member since:
    May 2010

    Posted 20 Mar 2012 Link to this post

    I have tried to paste "<A href="[=Link3]" target=_self>Read</A><BR>" to telerik editor in firexfox on Mac machine from notepad. When i paste this in telerik editor it converts it to "<A href="%5B=Link3%5D" target=_self>Read</A><BR>" . Please note the highlighted part of the text. Please help me on this.

    Abhinandan Bansal
  2. Rumen
    Rumen avatar
    14459 posts

    Posted 23 Mar 2012 Link to this post


    This is a browser behavior, which I was able to avoid using the following JavaScript code:

    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientPasteHtml="OnClientPasteHtml">
           <A href="[=Link3]" target=_self>Read</A><BR>
    <script type="text/javascript">
        function OnClientPasteHtml(sender, args) {
            var commandName = args.get_commandName();
            var content = args.get_value();
            if (commandName == "Paste") {
                re = /%5B/gi
                re1 = /%5D/gi
                content = content.replace(re, "[").replace(re1, "]");
                args.set_value(content);  //set the modified pasted content in the editor

    Another approach to solve it is by implementing a custom content filter.

    Best regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top