We are in the process of upgrading from Umbraco 13 to 14 and so have changed our tinyMCE Rich Text config setup. Using the same settings as previously, we have noticed that all on* element attributes (such as an onclick attribute within a button element) is being sanitized when exiting from source code view.
We have added the necessary settings such as:
"SanitizeTinyMce": false,
"valid_elements": "*[*]",
"extended_valid_elements": "*[*]",
but it is still sanitizing the onclick attribute in the button. We are not sure what is wrong here or what has changed to cause this from v13 to v14.
Here is our current umbraco-package.json:
{
"$schema": "../umbraco-package-schema.json",
"name": "TinyMCE",
"extensions": [
{
"type": "tinyMcePlugin",
"alias": "tinymce",
"name": "TinyMCE",
"meta": {
"SanitizeTinyMce": false,
"config": {
"plugins": [
"charmap",
"advlist",
"autolink",
"searchreplace"
],
"valid_elements": "*[*]",
"extended_valid_elements": "*[*]",
"entity_encoding": "raw",
"toc_depth": "4",
"relative_urls": false,
"remove_script_host": false,
"style_formats": [
{
"title": "Headings",
"items": [
{
"title": "Heading 1",
"block": "h1"
}
]
}
]
}
}
}
]
}
Any help would be much appreciated, thanks.