I'd like a button that will clear all html from the selected text. Could someone please help me with the code? I'm completely stumped on how to create a button that will clear the selected text of any bracketed (<>) html tags.

Thanks!!
Ben

Comments

ufku’s picture

fpedraza’s picture

Nice.

It would be even nicer if the regex could clean things like:

[p style='text-align:left']some text[/p]

fpedraza’s picture

I answer myself: I'm dumb.

Just have to add 'p' and the regex takes care of the rest.

ufku’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.