I'm trying filter font-family & font-size in style attribute for all HTML elements.
I need filtering like that:
INPUT:
- Code: Select all
<p style="font-family: Tahoma; font-size: 14px; text-align: right;">some cool text</p>
OUTPUT:
- Code: Select all
<p style="text-align: right;">some cool text</p>
I know how to filter an attribute but it doesn't help in me situation:
- Code: Select all
WYMeditor.XhtmlValidator._tags['p'] = {
'attributes': {
'style':/^$/,
'0':'name'
}
Can anyone suggest a solution?
Thank you.