Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 粘贴纯文本ajax自定义编辑器chrome问题_C#_Ajax_Text_Editor_Paste - Fatal编程技术网

C# 粘贴纯文本ajax自定义编辑器chrome问题

C# 粘贴纯文本ajax自定义编辑器chrome问题,c#,ajax,text,editor,paste,C#,Ajax,Text,Editor,Paste,我使用下面的代码在Ajax自定义编辑器中粘贴纯文本。它可以与IE和Firefox配合使用。但是chrome被搞砸了 请帮帮我 另外,是否有方法通过c代码访问自定义编辑器按钮,以应用事件或获取设置值 Sys.Application.add_load( function () { editor = $find('<%=Myeditor.ClientID%>'); // Editor's ID="myEditor" if (editor != null) {

我使用下面的代码在Ajax自定义编辑器中粘贴纯文本。它可以与IE和Firefox配合使用。但是chrome被搞砸了

请帮帮我

另外,是否有方法通过c代码访问自定义编辑器按钮,以应用事件或获取设置值

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;
        }
    }

});
Sys.Application.add\u load(函数()
{
编辑器=$find(“”);//编辑器ID=“myEditor”
如果(编辑器!=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=功能(ev){
if(ev.type==“keydown”&&ev.ctrlKey&&!ev.altKey){
//关键事件
if(String.fromCharCode(ev.keyCode).toLowerCase()=“v”){
这是公共粘贴(ev);
返回false;
}
}
返回true;
}
}
});