UEditor黑白名单配置

在网上找了很多,都不对。自己尝试,代码如下:

在new UEditor之前加上:

 Object.assign(window.UEDITOR_CONFIG.whitList, {
        filling: ['*'],
        answer: ['data-true', 'data-false'],
        subject: ['data-true', 'data-false'],
    });

  这样你的自定义标签就能识别了(注意不能为大写)。

 

posted @ 2018-06-20 13:02  石shi  阅读(285)  评论(0编辑  收藏  举报