简体   繁体   English

在Moodle中剥离HTML标签-TinyMCE

[英]Stripping HTML tags in Moodle - TinyMCE

When I am writing on TinyMCE in Moodle's wiki and writing an html code like this: 当我在Moodle的Wiki中用TinyMCE编写并编写这样的html代码时:

<a onclick="testFunction()" rel="test">myTest</a>

the onclick, rel and all other attributes from the anchor tag are getting stripped. 锚标记中的onclick,rel和所有其他属性都将被剥离。 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. 但是,当我在Moodle论坛中的TinyMCE编辑器中编写相同的代码时,则不会剥离锚标记。

I have granted both the Allow EMBED and OBJECT tags and Enable trusted content and also did that for every user. 我已授予Allow EMBED和OBJECT标签并启用了受信任的内容,并且还为每个用户执行了此操作。 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? 如何禁用Moodle的WiKi中的HTML标签剥离功能,或者至少允许一组预定义的标签?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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