none
Ajax Custom Editor paste plain text Chrome Issue RRS feed

  • Question

  • Hi,

    I used below code to paste plain text in my Ajax Custom Editor. It works fine with IE and Firefox. but chrome got screwed.

    please help me!

               

     Sys.Application.add_load( function ()
       {

            editor = $find('<%=Myeditor.ClientID%>');  // Editor's ID="myEditor"
            if (editor != null) {
                var editPanel = editor.get_editPanel();
                editPanel.set_noPaste(true);

            }


            //---------------------------------------------------

            if (Sys.Extended.UI.HTMLEditor.isIE) {
                var designMode = Sys.Extended.UI.HTMLEditor.ActiveModeType.Design;
                var designPanel = editPanel.get_modePanels()[designMode];


                designPanel.captureInDesign = function (ev) {
                    if (ev.type == "keydown" && ev.ctrlKey && !ev.altKey) {
                        // key event
                        if (String.fromCharCode(ev.keyCode).toLowerCase() == "v") {
                            this._commonPaste(ev);
                            return false;
                        }
                    }
                    return true;
                }
            }

    });

    Thursday, November 19, 2015 8:16 AM

Answers