Help with Button to remove all tags?

bensheldon - November 16, 2008 - 07:42
Project:BUEditor
Version:5.x-1.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

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

#1

ufku - January 30, 2009 - 18:40

#2

fpedraza - February 4, 2009 - 21:32

Nice.

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

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

#3

fpedraza - February 4, 2009 - 21:51

I answer myself: I'm dumb.

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

 
 

Drupal is a registered trademark of Dries Buytaert.