1

I have just started a site and it has a lot of in-line styling to clean up.

Is there a short cut way to remove the styling beyond doing it line by line?

eg in html.ts there is a remove_all_styles() - > is this possible to extend to remove_all_inline_styles() ?

UKDataGeek
  • 6,338
  • 9
  • 46
  • 63

2 Answers2

0

You could add a bit to the remove_all_styles() function where you do something like this:

remove(".//@style")

This will go through every HTML node child to the current node and remove the style attribute from it.

noj
  • 2,542
  • 1
  • 14
  • 9
  • Thanks - do you know where these standard funtions are stored. I am not sure where to update the remove_all_styles. – UKDataGeek Feb 02 '14 at 14:08
0

you can use remove_attributes() to remove all the attributes or remove_class('ClassName') else heir is no such function for removing inline styles