Search code examples
djangotinymcebleach

timyMCE allowed tags in django


In django I am using tinyMCE field for admin. I need to add a set of tags allowed by me, how can I do this?

'paste_as_text': True,

not suitable, need to write a list and make it universally


Solution

  • TinyMCE has a valid_elements configuration option that allows you to state exactly what tags are allowed:

    https://www.tiny.cloud/docs/configure/content-filtering/#valid_elements

    There are some other configuration options that you may want to look at as well: