Prevent the richtexteditor from removing the onclick() attribute?
Hello,
We're migrating a very large amount of content from our old site to a new Umbraco site. I've noticed that if I save some of this content in the richtexteditor, it removed the "onclick" attribute from a tags, even if I manually change them to a span instead.
I looked up the documentation to configure the TinyMCE editor so that it allows all tags and attributes by setting ValidElements to *[*], and although that resolved many of the other issues, it still insists on removing onclick from tags.
Thanks for pointing me to that setting, don't know how I missed that. Unfortunately, setting it to false still did not allow "onclick" in the richtexteditor. I wonder if this is something new to Umbraco 10?
Prevent the richtexteditor from removing the onclick() attribute?
Hello,
We're migrating a very large amount of content from our old site to a new Umbraco site. I've noticed that if I save some of this content in the richtexteditor, it removed the "onclick" attribute from a tags, even if I manually change them to a span instead.
I looked up the documentation to configure the TinyMCE editor so that it allows all tags and attributes by setting ValidElements to *[*], and although that resolved many of the other issues, it still insists on removing onclick from tags.
Here is my richtexteditor settings:
Has anyone resolved this somehow?
Thank you!
John
The issue relates to the setting
"SanitizeTinyMce", if set to true it removes the onclick attribute.The setting appears to override the ValidElements settings
Thanks for pointing me to that setting, don't know how I missed that. Unfortunately, setting it to false still did not allow "onclick" in the richtexteditor. I wonder if this is something new to Umbraco 10?
It works ok for me, but I am not using
*[*]for my valid elements, I have the following, copied from my Umbraco 8 siteis working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" button below.
Continue discussion