【问题标题】:Medium Editor paste options not working中型编辑器粘贴选项不起作用
【发布时间】:2016-01-06 06:09:19
【问题描述】:

这是我的配置

new MediumEditor(".editor", {
    buttons: ['italic', 'bold', 'underline', 'anchor', 'unorderedlist', 'quote'],
    paste: {
        // This example includes the default options for paste, if nothing is passed this is what it used
        forcePlainText: false,
        cleanPastedHtml: true,
        cleanReplacements: [],
        cleanAttrs: ['id', 'style'],
        cleanTags: ['a', 'br']
    }
});

当我粘贴一些 html 文本时,我希望删除 idstyle attrs,以及 abr 标签。但这并没有发生,请参阅plunker here

我做错了吗?

【问题讨论】:

标签: javascript medium-editor


【解决方案1】:

看起来这是您传入的选项名称之间的拼写错误:cleanPastedHtmlcleanPastedHTML

如果您改用cleanPastedHTML,我相信这会解决您的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多