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]
You can bring the toolbar down using toolbar_location: "bottom" . Regarding CSS, you can override the default CSS with your own styles using content_css . For example: content_css: "/mycontent.
</p></textarea> <br><br> <label class="container">Editable ("design") mode <input type="checkbox" checked onclick="toggleEditorMode(this. checked); return true;"> <span class="checkmark"></span> </label> <br> Use the checkbox to toggle between the "design" and "readonly" modes.
There you go, there is an undocumented option called "valid_styles".
More & Syntax: http://tinymce.moxiecode.com/forum/viewtopic.php?id=21554
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With