解决 ueditor 不能添加锚点

2020年3月17日 0 条评论 1.46k 次阅读 0 人点赞
  1. ueditor 添加锚点方式

  2. ueditor 添加锚点很简单,在链接处添加连接输入 #value ,然后在锚点处添加锚点输入 value

    但是 ueditor 默认锚点添加会失败,因为标签转来转去, name 属性转没了。

  3. 需要修改 ueditor.config.js 这个文件

  4. 找到 whitList ,给 aimg 添加 idname,

    修改 aimg 的值如下

    a:      ['target', 'href', 'title', 'class', 'style','id','name'],
    ...
    img:    ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex','anchorname'],

    然后 ctrl+F5 强制刷新再试就可以了


来自于: http://bcxw.net/article/86.html

Sevenfal

这个人太懒什么东西都没留下

文章评论(0)