Forum closed. New forum available at http://community.wymeditor.org/

How can I filter font-family & font-size?

Support forum for WYMeditor.

How can I filter font-family & font-size?

Postby Dumitru on Sun Jun 21, 2009 8:32 am

Hi,

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.
Dumitru
 
Posts: 1
Joined: Sun Jun 21, 2009 8:18 am

Re: How can I filter font-family & font-size?

Postby mr_lundis on Fri Jun 26, 2009 8:18 am

Hello Dumitru and welcome to the WYMeditor forum!
I'm not sure I understand what you're trying to do. Do you want to filter the inline css for all HTML elements or are you trying to clean up content pasted into the editor by the user?

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests