Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: ergophobe

Message Too Old, No Replies

Scipt to Clean up Wysiwyg and Word Codes

The Bane of all CMS

   
6:42 pm on Oct 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I'm sure you've all had the problem. Your CMS has a Wysiwyg editor, and your collaborators go crazy on the fonts and colours, although you repeatdly tell them NOT TO USE THEM. There's also the well know bug from Word where Wysiwyg editors can't figure out what's coming out of Word and the end article, provided by a non Webbie is filled with different fonts, sizes and colours.

I know the CSS fix to remove unwanted tags doesn't work in Internet Explorer (hum, the other half of the problem - but I disgress). Is there a script I can run on the site every day to remove all those unwanted fonts and tags. It's driving me crazy and short of nuking the Wysiwyg editor, I don't know what else to do. I need the Wysiwyg editor because it's faster to create links. I wouldn't want to lose a powerful SEO tool to accomodate non techies.

Is there a solution?

8:28 pm on Oct 24, 2006 (gmt 0)

5+ Year Member



well, assuming that your CMS uses a database, it should be possible to write a script to go through the data and strip out unwanted codes. It'd have to be pretty specialized, I doubt you'll find a generic tool to do this.
8:57 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Most of the popular wysiwyg editors bundled with/available for CMS tools can be configured not to show any or all of the formatting tools...

-b

1:35 pm on Oct 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi. Even if I hide the buttons (I've tried that already), it won't solve the problem. The problem is Microsoft Word. It's the only word processor that inserts hidden tags that most editor try to make sense of. Even if I hide the formatting buttons, it will pick up the mess from Word.
1:46 pm on Oct 25, 2006 (gmt 0)

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Is there a script I can run on the site every day to remove all those unwanted fonts and tags.

I don't believe that's the correct fix for the problem. In fact, it's not a fix at all, it's a kludge ;)

The problem you're experiencing is why most forums use a variation of BB code and do not allow HTML. Why not just do that and create your own tags?

TJ