bernhard Posted May 11, 2023 Share Posted May 11, 2023 I'm using TinyMCE and have configured it to only allow a very limited set of features: At least I thought so. Until a client copied content from the old website and I was surprised to see images in these TEXT-fields... Turns out that TinyMCE seems to allow basically any HTML in it even if the toolbar is configured differently. Does anybody know who I would - for example - set up a TinyMCE field that only allows regular text and <strong>bold</strong> text? Link to comment Share on other sites More sharing options...
monollonom Posted May 11, 2023 Share Posted May 11, 2023 Haven't used it yet but I think this is something you can control in the module’s (or even in the field’s?) settings with the pastefilter whitelist: 3 1 Link to comment Share on other sites More sharing options...
ryan Posted May 11, 2023 Share Posted May 11, 2023 @bernhard The Pastefilter may be good for this specific case, since you are wanting to filter pasted content. But also have a look at the valid_elements and/or invalid_elements options, which give you control over what tags and attributes are supported in the input. 2 2 Link to comment Share on other sites More sharing options...
stanoliver Posted May 11, 2023 Share Posted May 11, 2023 IS THIS A BUG IN PROCESSWIRE? Right above the custom json field in tinymce settings there is an area called "markup toggles" containing a checkbox with 3 options to click. => It is not possible for me to uncheck one or all options because every time after saving and reloading the page again the before unchecked boxes are all checked again automatically. Even when I have no strict other filters activated at all. Link to comment Share on other sites More sharing options...
matjazp Posted May 12, 2023 Share Posted May 12, 2023 Open /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module.php and comment lines 289-291 and see if this helps. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now