请教一下各位大神们!
先把ueditor编辑器里面的html源码都存到数据库了,然后在修改的时候,取出来的数据也是没问题,可是用setContent把数据放到编辑器里面修改的时候,video的标签会变成img标签,造成数据不对!请问有遇到过这个问题的吗?
先把ueditor编辑器里面的html源码都存到数据库了,然后在修改的时候,取出来的数据也是没问题,可是用setContent把数据放到编辑器里面修改的时候,video的标签会变成img标签,造成数据不对!请问有遇到过这个问题的吗?
//debugger
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 = '<video ' + (id ? 'id="' + id+'"' : '') + ' _original="'+type+'" width="'+ width +'" height="' + height + '" _url="'+url+'" class="' + classname.replace(/\bvideo-js\b/, '') + '"' +
' src="'+url+'" controls="controls" style="background: #000;"></video><br>'
//debugger
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;
}