eWebEditor复制粘贴图片时过滤域名

1.找到form.js

  路径:plugins/frame/scripts/form.js  

  这个方法:

2.替换这个方法

/**
     * 处理参数
     */
    Form.prototype.processReqParam = function(){
        for(var i = 0; i < this.formIds.length; i ++){
            $("[route='" + this.formIds[i] + "']").find("iframe[tagName='webEditor']").each(function(j){
                var linkId = $(this).attr("link");
                var iframe = $(this)[0];
                var value = iframe.contentWindow.document.getElementById("eWebEditor").contentWindow.document.body.innerHTML;
                var host = (window.location.protocol + "//" + window.location.host);
                value = $.string.replaceAll(value,host,"");
                
                $("#" + linkId).val(value);
            });
            
        }
    };

 

posted on 2017-03-17 15:21  小人物的奋斗  阅读(442)  评论(0编辑  收藏  举报

导航