Jump to content

How to create an unsafe and irresponsible tinyMCE field?


zota
 Share

Recommended Posts

Hello!

I've just start learning  the use of  tinyMCE in processwire and, therefore, I should postpone my question. But, sorry, I got a bit nervous.

I need a field that allows total or almost total pasting, that maintains styles, without eliminating <td>s because they are empty, that allows injecting div.whatever-class (only injects paragraphs), in short, a sloppy and irresponsible tinyMCE field. Other text fields will be more cautious. Ryan starts (and very well) by the cautious side... Can anyone give me a clue?
Thanks

Link to comment
Share on other sites

xss_sanitization option as of v 6.4 can be turned off via configuration:

This turns off DOMPurify.

https://www.tiny.cloud/docs/tinymce/6/security/#turning-dompurify-off

A not so nuclear option might be to define a very limited content filtering option by setting very liberal/empty invalid styles:

https://www.tiny.cloud/docs/tinymce/6/content-filtering/#invalid_styles

Finally, you can extend_valid_elements if you want to additively include lots of formats you don't want to get stripped out. This preserves the rules set for valid_elements (including the default rules) and throws a layer on top of that.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...