Forum closed. New forum available at

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


I'm trying filter font-family & font-size in style attribute for all HTML elements.

I need filtering like that:
Code: Select all
<p style="font-family: Tahoma; font-size: 14px; text-align: right;">some cool text</p>

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': {

Can anyone suggest a solution?

Thank you.
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!
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Return to Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests