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>
UE.plugins["video"] = function () {