TinyMCE's valid_elements
property lets you define a whitelist of valid HTML elements and their attributes. You can allow only paragraphs and links with this:
tinyMCE.init({
valid_elements: 'p,a[href]'
});
However, the style
attribute is a bit of a problem. It's needed for certain things like aligning, but if you allow it then it could contain all sorts of undesirable CSS rules. Is there any way to restrict its contents to only allow certain rules, something like this:
a[href|style=text-align,font-size,color]