Forum Academy Marketplace Showcase Pricing Features

Is there a way to remove rich text formatting?

I’m creating a blog where the home page displays previews of posts formatted with rich text (created with the rich text editor). I’d like to strip the rich text formatting for the previews… any way to do that?

1 Like

Not right now, no.

@emmanuel Any update on this? Would be a great feature.

No, no update.

Could run it through a regular expression \[.+?\] and empty replacement to strip out everything in [square braces].

The \[ and \] means a literal brace, not an expression.
The . means any character.
The + means one or more "any character"s.
The ? means limit the “one or more” to get the minimal number of characters to fit the expression, so it doesn’t match plain text between rich text.

This demo is handy to fiddle with the regex to get it right for what you want:

1 Like

Interesting, thanks