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
<pre>
some code here...
</pre>
I would like Wymeditor to output:
- Code: Select all
<code>
some code here...
</code>
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
display:block;
width:80%;
margin-top:15px;
padding:15px 0;
font:1em monospace;
white-space:pre;
overflow:auto;
Then, Wymeditor would finally be 100% standards compliant