UEditor黑白名单配置

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

在new UEditor之前加上:

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

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

猜你喜欢

转载自www.cnblogs.com/sunliyuan/p/9203248.html
今日推荐