Forum closed. New forum available at http://community.wymeditor.org/

PRE tags... no no

Support forum for WYMeditor.

PRE tags... no no

Postby risoknop on Sun Oct 12, 2008 1:49 pm

Hello,

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 ;)
risoknop
 
Posts: 3
Joined: Sun Oct 12, 2008 1:43 pm

Re: PRE tags... no no

Postby risoknop on Sun Oct 12, 2008 6:23 pm

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 ;)
risoknop
 
Posts: 3
Joined: Sun Oct 12, 2008 1:43 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest