zoukankan      html  css  js  c++  java
  • 【插件】百度编译器ueditor插入视频的时候。在预览的窗口提示 “输入的视频地址有误,请检查后再试!

    错误提示图片:

    解决办法:
    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="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"' +'   
    
    

    清除浏览器缓存,再来!

  • 相关阅读:
    Android-通过SlidingPaneLayout高仿微信6.2最新版手势滑动返回(一)
    B树
    nyoj448 寻找最大数
    IT痴汉的工作现状22-由Dalvik虚拟机引发的口水战
    POJ 3221 Diamond Puzzle.
    CMDBuild安装及webservice接口的获取
    安卓dex 文件结构简要说明
    安装RPM包或者安装源代码包
    Java程序性能优化技巧
    [Sqlite]--&gt;数据迁移备份--从低版本号3.6.2到高版本号3.8.6
  • 原文地址:https://www.cnblogs.com/richerdyoung/p/12166427.html
Copyright © 2011-2022 走看看