ueditor 編輯器視屏上傳問題
阿新 • • 發佈:2019-01-08
問題:
ueditor.config.js 檔案 搜尋 whitList video: ['poster','autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'] 中新增 poster標籤 防止該標籤被過濾 ueditor.all.js 檔案 搜尋 function creatInsertStr 把內容修改如下(poster標籤尤為中要不要留了,這個是針對阿里雲oss做的) case 'video': var ext = url.substr(url.lastIndexOf('.') + 1); if(ext == 'ogv') ext = 'ogg'; str = '<video' + (id ? ' id="' + id + '"' : '') + 'poster="'+url+'?x-oss-process=video/snapshot,t_100,f_jpg,m_fast" 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;