在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ ueditor插入video后面有source標簽,怎么去掉source標簽?

ueditor插入video后面有source標簽,怎么去掉source標簽?

ueditor插入video后面有source標簽,怎么去掉source標簽?

回答
編輯回答
冷眸

UE.plugins["video"] = function () {

    var me = this;

    function creatInsertStr(url, width, height, id, align, classname, type) {
        url = utils.unhtmlForUrl(url);
        align = utils.unhtml(align);
        classname = utils.unhtml(classname);
        width = parseInt(width, 10) || 0;
        height = parseInt(height, 10) || 0;
        var str;
        switch (type) {
            case"image":
                str = "<img " + (id ? 'id="' + id + '"' : "") + ' width="' + width + '" height="' + height + '" _url="' + url + '" class="' + classname.replace(/\bvideo-js\b/, "") + '" src="' + me.options.UEDITOR_HOME_URL + 'themes/default/images/spacer.gif" style="background:url(' + me.options.UEDITOR_HOME_URL + "themes/default/images/videologo.gif) no-repeat center center; border:1px solid gray;" + (align ? "float:" + align + ";" : "") + '" />';
                break;
            case"embed":
                str = '<embed type="application/x-shockwave-flash" class="' + classname + '" pluginspage="http://www.macromedia.com/go/getflashplayer" src="' + utils.html(url) + '" width="' + width + '" height="' + height + '"' + (align ? ' style="float:' + align + '"' : "") + ' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" >';
                break;
            case"video":
                var ext = url.substr(url.lastIndexOf(".") + 1);
                if (ext == "ogv") {
                    ext = "ogg"
                }
                str = "<video" + (id ? ' id="' + id + '"' : "") + ' class="' + classname + ' video-js" ' + (align ? ' style="float:' + align + '"' : "") + ' controls preload="none" width="' + width + '" height="' + height + '" src="' + url + '" data-setup="{}">' +
                    // '<source src="' + url + '" type="video/' + ext + '" />' +
                    '</video>';
                break
        }
        return str
    }
    
    
    
    全文搜索,這是Ueditor代碼,ueditor.all.js 最終便簽插入圖片和視頻,在這兒生成,你可以注釋掉<source>
2017年4月24日 18:02