简体   繁体   中英

Stripping HTML tags in Moodle - TinyMCE

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?

您将必须在tinymce.js.php安装中找到tinymce配置(通常是一个名为tinymce.js.php的文件),并根据需要更改设置valid_elements (检查链接以了解如何定义有效属性以保持其有效性)。他们在编辑器中)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM