cyphix
08-12-2008, 08:49 PM
Hey guys..... I'm using a WYSIWYG editor on a site & problem is it doesn't output the HTML in xHTML so I was wondering if there was any available solutions currently around for this? AFAIK there isn't any in-built functions for this.
Thanks!
infinivert
08-12-2008, 08:59 PM
Well, there is a utility called Tidy that converts HTML to XHTML, but truthfully, you'd be better off investing a little time into learning HTML / XHTML. WYSIWYG editors are notorious for outputting horrific code.
Learning is pretty simple, and there are a ton of free sources on the web. I'd start at w3schools.com
--Josh
cyphix
08-12-2008, 10:50 PM
Hey..... sorry I should have been more clear..... I'm already experienced in xHTML/HTML..... but I am using a WYSIWYG editor in an application for a client but the problem is the code it generates is in HTML & not xHTML & hence I wanted to feed the output into a converter function before inserting the data into the database.
Cheers!
oesxyl
08-12-2008, 11:57 PM
Well, there is a utility called Tidy that converts HTML to XHTML, but truthfully, you'd be better off investing a little time into learning HTML / XHTML. WYSIWYG editors are notorious for outputting horrific code.
Learning is pretty simple, and there are a ton of free sources on the web. I'd start at w3schools.com
--Josh
Hey..... sorry I should have been more clear..... I'm already experienced in xHTML/HTML..... but I am using a WYSIWYG editor in an application for a client but the problem is the code it generates is in HTML & not xHTML & hence I wanted to feed the output into a converter function before inserting the data into the database.
Cheers!
could be a solution, as infinivert said:
php tidy (http://www.php.net/manual/en/book.tidy.php)
or modify the editor if you have access to source. If it generate valid html 4.01 could be simple to make it generate xhtml.
regards