Chipersoft WMD - Yahoo Yui Reset.css - Preview Mode not working

99 views Asked by At

I wrote a custom Symfony (1.4) Textarea class to allow the ability to convert a textarea into a WMD editor. Right now I am using Chipersoft WMD along with a few Yahoo yui (v3.4.0) css libraries (reset, fonts, and grids).

Everything works great, except for the WMD 'preview div', where it is supposed to render html tags as they are added/removed in the 'input textarea'. After some time narrowing down the issue, I was able to determine with 100% certainty, that it has to do with the Yahoo yui reset.css library. I was able to determine this by copying the library contents to a local file and commenting out css blocks until I could find the exact trigger which was causing the html to not render in the 'preview div'.

Here is what I found to be the problem code:

address,
caption,
cite,
code,
dfn,
em,
strong,
th,
var {
    font-style:normal;
    font-weight:normal;
}

When I comment out this block of code, and refresh the page, the 'preview div' correctly displays any words that were flagged as bold or italic.

So my question is, has anyone encountered this same issue, in using Chipersoft WMD together with Yahoo's yui reset.css library? If so how did you get around this issue?

At this point the only thing I can think of is to copy the contents of reset.css to a local css file and not call the Yahoo yui version via http://yui.yahooapis.com/3.4.0/build/cssreset/reset.css, which I'd rather not do, because I'd prefer to use yahoo's bandwidth and not mine.

Thanks in advance.

1

There are 1 answers

0
Mike Purcell On BEST ANSWER

Ended up just copying the contents of reset.css into a local file I can control. Then I commented out the offending css, and everything works. Not my preferred solution but already spent too much time on something so trivial.