Selective band labels in TextMate

Is there a way to selectively erase HTML tags in TextMate - you can easily do that in Dreamweaver . TextMate allows you to strip all HTML tags, but I would like to get rid of them, let's say all <span>

and <font>

.

In a thread like this, is there a way to get rid of all inline CSS styles?

+1


a source to share


2 answers


Why not use regular expression replacement? For instance. to get rid of all inline css styles you just replace

 style=".*"

      



nothing (empty string). Pay attention to the leading space.

+2


a source


Not that I know, but there is always the option to make Find / Replace for <span>

(and </span>

obviously) and leave the Replace field blank. Of course, this becomes a little more problematic if you have gaps with different class / id or what-have-you attributes and then you get into RegExp territory.



This should at least give you a start. I would be interested to know what else someone else has to suggest. Textmate is so customizable that I'm sure there is a better solution than what I suggested!

+2


a source







All Articles