Trimming Whitespace From Html Content?
I have a CRUD maintenance screen with a custom rich text editor control (FCKEditor actually) and the program extracts the formatted text as HTML from the control for saving to the
Solution 1:
/<p>(?:<br\s*\/>|&[#\w]{2,6};|[\s\n\r])*?<\/p>/g
That should match all paragraphs that don't contain any "meaningful text".
It's probably best to do it on the server-side though.
Post a Comment for "Trimming Whitespace From Html Content?"