• Vue.js中Ueditor如何引用 youtube视频源发布(已解决)


    Ueditor 发布文章是很多人都用的插件,加入也是有自带的,但是如果要插入youtube 在线地址,会发现就不灵了,不能播放。

    原因是youtube无法使用video标签使用。是可以用 embed iframe 嵌入标签的。这就需要改造一下ued了。

     修改config.js文件

    在白名单whitList加上 标签:

    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']

    如果有其他 比如 video 也加上 :

    			u:      [],
    			ul:     ['class', 'style'],
    			video:  ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'],
    			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']

     再在all.js修改标签:

    把 video 换成 embed 或者 iframe 如下图:

    原来 是 video 的:

    修改完 就可以了:

    插入之后就可以 添加到文本中去了,也能提交到后台。后台返回的时候原样标签返回就可以了。

  • 相关阅读:
    GridView合并行代码
    GridView合并行头代码
    Javascript 的几种写法与提示
    [转] 浅谈MSSQL锁机制
    Two ways of using memory: Stack and Heap
    You have to know how .Net code "managed"?
    Sql Server Profiler
    InterProcess Communication
    database Index
    敏捷开发
  • 原文地址:https://www.cnblogs.com/lllomh/p/14991890.html
Copyright © 2020-2023  润新知