zoukankan      html  css  js  c++  java
  • 解决百度编辑器ueditor插入视频网址保存不了问题

    问题:如下图,在百度编辑器中插入视频,视频网址可以识别,但是提交内容后视频却显示不了。

    解决:这个问题主要是编辑器中会过滤一些html标签,所以可以给标签添加白名单。

    修改 ueditor.config.js 文件:

    修改:

    img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', '_url', 'loadingclass', 'class', 'data-latex'],

    在白名单后面添加:

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

    修改后如下所示:

  • 相关阅读:
    2021年2月13
    2021年2月12
    2021年2月11
    2021年2月10
    2021年2月9
    下载优化
    20180301越努力越轻松
    2018-03-01继续完善2
    2018-03-01继续完善
    2018-02-16 GetSameTypeQuestion
  • 原文地址:https://www.cnblogs.com/woods1815/p/9649291.html
Copyright © 2011-2022 走看看