?
avatar konstantin-karetny
konstantin-karetny
1 Mar 2016

Even when I log in as Super Administrator with selected 'No Filtering' filter type in System => Global Configuration => Text Filters;
Even when I add 'script' in 'Valid Elements' field in 'Editor - TinyMCE' plugin settings;
I still can not add JavaScript events like onclick for tags in TinyMCE editor.
I think if I am Super Administrator with all rights I must have some opportunity to make some elementary actions like this one. Am I wrong?

avatar konstantin-karetny konstantin-karetny - open - 1 Mar 2016
avatar richard67
richard67 - comment - 1 Mar 2016

What does the field "Prohibited Elements" in the plugin settings of TinyMCE (is at the very bottom of the 1st tab) contain?

If it contains "script", remove that, and it will work.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9268.

avatar brianteeman brianteeman - change - 1 Mar 2016
Status New Information Required
avatar konstantin-karetny
konstantin-karetny - comment - 1 Mar 2016

Sure I tried that, and it's allows me only to add a <script></script> tag, but I need to add an attribute onclick="" to an existing tag.
TinyMCE just deletes all event attributes like onclick at any settings, that's the problem.

avatar richard67
richard67 - comment - 1 Mar 2016

Hmm, I see ... sorry for asking.

avatar konstantin-karetny
konstantin-karetny - comment - 1 Mar 2016

Kein Problem!
Yes, try to play with this. Judging by deep googling this is the old issue but there is no solution for now.
At least I have not found it yet.

avatar brianteeman
brianteeman - comment - 3 Mar 2016

Have you looked through the tinymce bug tracker?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9268.

avatar dgt41
dgt41 - comment - 3 Mar 2016

What is the tag that you are trying to put the onclick? <a> or something else?

avatar dgt41
dgt41 - comment - 3 Mar 2016

Also from tinymce' documentation:

Also note that all event attributes are excluded by default since it's a bad practice to use inline script handles like "onclick". You can manually add extra elements and attributes using the extended_valid_elements option.

https://www.tinymce.com/docs/configure/content-filtering/#extended_valid_elements

avatar konstantin-karetny
konstantin-karetny - comment - 3 Mar 2016

dgt41, I tried to add onclick to different tags.
Many thanks for link!
Now topic can be closed, the problem is solved.
I just set *[*] value for the 'Valid Elements' field, according to to the TinyMCE documentation:

Use *[*] to include all elements and all attributes.

https://www.tinymce.com/docs/configure/content-filtering/#specialvariables

avatar brianteeman
brianteeman - comment - 3 Mar 2016

Closed as requested - this is a tinymce issue not one we can alter

avatar brianteeman brianteeman - close - 3 Mar 2016
avatar brianteeman brianteeman - change - 3 Mar 2016
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2016-03-03 09:02:08
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment