Configuration of valid elements in RTE's
# help-with-umbraco
s
Hey there! I'm trying to configure the RTE's in an Umbraco 12 installation to only allow specific HTML elements - specifically the ones we are able to insert when formatting the rich text through the editor. Our goal is to remove any other tags and attributes that might be included when editors paste text from somewhere else. I'm trying to use the Umbraco:CMS:RichTextEditor:ValidElements configuration as is documented a bit in these two links: https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/configuration#allowing-script-tags-in-the-rte https://docs.umbraco.com/umbraco-cms/reference/configuration/richtexteditorsettings Specifically I'm trying to set this string as the configuration: "@[style|data-mce-style],+a[!href|title|data-anchor|data-mce-href|data-mce-selected],h2,h3,p,strong/b,em/i/italic,ul,ol,li". This has been built using Tiny's own MCE documentation: https://www.tiny.cloud/docs/tinymce/6/content-filtering/#valid_elements. The configuration doesn't do anything discernible , though. When I paste e.g. some div's into an RTE and then save or publish, the div's aren't removed, and I'm not being told that I'm doing something illegal. I am able to succesfully configure plugins that the RTE uses, but I also couldn't get the InvalidElements configuration to do anything. From the (very sparse) documentation there is on how Umbraco handles these configuration, I'd expect that the RTE would remove the non-valid tags and attributes when I save. Am I missing something about how this is supposed to be used? Or is there maybe some problem in how I set it up or how Umbraco uses it? Thanks in advance, good people!