Reputation: 5454
Is there anyway to make the dijit.Editor strip HTML style="" attributes from pasted content?
If I copy text from another site, it copies it's font-size, color, etc and puts it into span tags. I would prefer to only strip styles when pasting.
I already have a tried-and-tested regex to replace the content, but I don't know how to hook it up with the dijit.Editor. I tried pushing a function to contentPreFilters but that doesn't get called when pasting text.
Upvotes: 1
Views: 1341
Reputation: 35
Try the dojox.editor.plugins.NormalizeStyle Plugin by Jared Jurkiewicz. It allows for configuring either CSS style or normal attributes output.
Upvotes: 1