bernhard Posted April 25, 2020 Share Posted April 25, 2020 Stripping off empty paragraphs can be harder than it may sound: As requested by @netcarver I put it into a textformatter module: https://github.com/BernhardBaumrock/TextformatterRemoveEmptyParagraphs https://modules.processwire.com/modules/textformatter-remove-empty-paragraphs/ TextformatterRemoveEmptyParagraphs ProcessWire Textformatter to remove empty paragraphs from CKE fields Removes empty paragraphs from a html string. A paragraph is considered to be empty if it only contains one or more of the following: regular whitespace UTF-8 encoded whitespace all variants of <br/> PS: I'm actually not sure if that makes sense as Textformatter at all. IMHO this should be done on processInput, so it's more a sanitization than a textformatter... @netcarver what do you think, as you requested this... ? 3 Link to comment Share on other sites More sharing options...
teppo Posted May 2, 2020 Share Posted May 2, 2020 Hey @bernhard. Just a quick heads-up: the support board link in the modules directory points to the GitHub repository. Assuming that wasn't intentional ? 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