This is my config
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']
}
});
When i paste some html text i would expect the id
and style
attrs to be removed, aswell as the a
and br
tags. But thats not happening, see plunker here
Am i doing something wrong?
It looks like this was a typo between camel casing the option name you passed in: cleanPastedHtml
vs cleanPastedHTML
.
If you use cleanPastedHTML
instead, I believe this will fix your problem.