User tests: Successful: Unsuccessful:
Add valid_elements option to TinyMCE plugin (http://www.tinymce.com/wiki.php/configuration:valid_elements). This option allows users to change the default behavior (e.g.: set [] to include all elements and all attributes).
Tested. Works fine
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-05-26 09:12:22 |
You guys are aware that the tags listed in global config are going to override this whatever right?
No but also yes :p
So the tiny stuff will work as described in the PR but in the majority of instances in core components yes because we have https://github.com/joomla/joomla-cms/blob/staging/components/com_content/models/forms/article.xml#L53 the JComponentHelper::filterText which then uses the text filters in global config. These will then be applied after the tiny html char stripping.
Also unless you do workarounds in your component then JInput automatically calls JFilterInput which is then going to strip stuff because by default you get cmd filtering https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/filter/input.php
So, shouldn't we just remove these settings then?
I dunno - I mean it will strip anything in these parameters that isn't in the stuff in global config. So it will work in that sense. It's not my decision really :P
Let's stick to if it ain't broke, don't try to fix it then :)
This parameter is not limited to display all elements. It is much more powerful.
This example string tells TinyMCE to remove all elements that are not a "a, strong, div or br" element, convert "b" elements to "strong" elements, default "target" to "_blank" and keep the "href", "target" and "align" attributes of the elements.
tinyMCE.init({
...
valid_elements : "a[href|target=_blank],strong/b,div[align],br"
});
Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33298&start=0