Page 1 of 1

PRE tags... no no

PostPosted: Sun Oct 12, 2008 1:49 pm
by risoknop

I am building a lightweight and standards compliant open-source CMS. I have decided to use Wymeditor there as a replacement for textareas because it is definately the best solution I could find. Firstly I was thinking about building my own custom JavaScript browser-based editor but I am not very good with JavaScript so I have decided to stick with Wymeditor and concentrate on PHP coding.

There is a small annoying problem I have though. Pre tags. I would like to get rid of them and instead, use code tags (styled through CSS to work the same as pre tags). The reason for that is I am a big fan of web standards and pre tags are obsolete and not compliant.

How can I replace all pre tags with code tags?

Example... Instead of:

Code: Select all
    some code here...

I would like Wymeditor to output:

Code: Select all
    some code here...

It would be nice if you also abandoned the pre tags officially and used code tags instead, as it is very easy to style them with CSS:

Code: Select all
padding:15px 0;
font:1em monospace;

Then, Wymeditor would finally be 100% standards compliant ;)

Re: PRE tags... no no

PostPosted: Sun Oct 12, 2008 6:23 pm
by risoknop
I have solved this problem by getting rid of the pre tags server side and then putting them back again before loading the textarea but that is a bad solution.

It would be nice if future versions of Wymeditor weren't using pre tags at all ;)