錯誤提示圖片:
解決辦法:
1 打開文件: ueditor.all.js:
搜索 me.commands["insertvideo"]
把
html.push(creatInsertStr( vi.url, vi.width || 420, vi.height || 280, id + i, null, cl, 'image'));
```
改為插入的 embed 標簽
```html
html.push(creatInsertStr( vi.url, vi.width || 420, vi.height || 280, id + i, null, cl, 'embed'));
2 打開文件: ueditor.config.js:
搜索: whitList
, img里面添加"_url"
在最后增加:
source: ['src', 'type'],
embed: ['type', 'class', 'pluginspage', 'src', 'width', 'height', 'align', 'style', 'wmode', 'play','autoplay','loop', 'menu', 'allowscriptaccess', 'allowfullscreen', 'controls', 'preload'],
iframe: ['src', 'class', 'height', 'width', 'max-width', 'max-height', 'align', 'frameborder', 'allowfullscreen']
3 打開文件: dialogs/video/video.js
搜索 function createPreviewVideo(url)
把下面的內容替換
$G("preview").innerHTML = '<video class="previewVideo" controls="controls" src="'+conUrl+'" style="width:420;height:280 "></video>';
注意事項:
1 、ueditor 在上傳視頻之后,編輯頁面,顯示空白。查看html有視頻,就是顯示空白
解決辦法:
打開文件: ueditor.all.js
搜索
setContent: function (html, isAppendTo, notFireSelectionchange)
2 、 上傳之后,,無法關閉彈窗
原因:因為改動embed后,下面紅框的代碼無法正常找到image標簽及其里面的屬性導致的,
解決辦法:
打開文件: ueditor.all.js:
搜索 me.commands["insertvideo"]
, 注釋掉紅框部分:
3 在顯示時候,無法顯示問題:
打開文件: ueditor.all.js:
搜索 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;
改為
str = '<embed 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;
其實就是去掉了:
type="application/x-shockwave-flash" class="' + classname + '" pluginspage="http://www.macromedia.com/go/getflashplayer"' +'
清除瀏覽器緩存,再來!