Reputation: 7101
When I am writing on TinyMCE in Moodle's wiki and writing an html code like this:
<a onclick="testFunction()" rel="test">myTest</a>
the onclick, rel and all other attributes from the anchor tag are getting stripped. However when I am writting the same code in the TinyMCE editor in the Moodle's forum, then it does not strip the anchor tag.
I have granted both the Allow EMBED and OBJECT tags and Enable trusted content and also did that for every user. Does anyone have any clue about this issue?
How to disable HTML tags stripping in Moodle's WiKi or at least allow a predefined set of tags?
Upvotes: 1
Views: 3189
Reputation: 50840
You will have to find the tinymce configuration in moodle installation (it is usually a file called tinymce.js.php
) and change the settings valid_elements according to your needs (check the links to get to know how to define valid attributes in order to keep them in the editor).
Upvotes: 1