? Success

User tests: Successful: Unsuccessful:

avatar s2software
s2software
17 Feb 2014

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).

avatar s2software s2software - open - 17 Feb 2014
avatar losedk
losedk - comment - 23 Apr 2014

Tested. Works fine

avatar infograf768 infograf768 - merge - 26 May 2014
avatar infograf768 infograf768 - close - 26 May 2014
avatar infograf768 infograf768 - reference | - 26 May 14
avatar infograf768 infograf768 - close - 26 May 2014
avatar infograf768 infograf768 - change - 26 May 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-05-26 09:12:22
avatar wilsonge
wilsonge - comment - 26 May 2014

You guys are aware that the tags listed in global config are going to override this whatever right?

avatar roland-d
roland-d - comment - 26 May 2014

@wilsonge what you are saying is that all these TinyMCE configuration filter settings are obsolete?

avatar wilsonge
wilsonge - comment - 26 May 2014

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

avatar roland-d
roland-d - comment - 27 May 2014

So, shouldn't we just remove these settings then?

avatar wilsonge
wilsonge - comment - 27 May 2014

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

avatar roland-d
roland-d - comment - 27 May 2014

Let's stick to if it ain't broke, don't try to fix it then :)

avatar infograf768
infograf768 - comment - 30 May 2014

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"
});

Add a Comment

Login with GitHub to post a comment