Search code examples
firefoxyuirich-text-editoryui2

YUI 2 Rich text editor bugs on firefox within specific case


I am not able to make the rich text editor from YUI 2 (see http://developer.yahoo.com/yui/editor/) works in Firefox

My project--> A forum

Here are images of what's happening:

In IE with no comment: http://imageshack.us/photo/my-images/39/ienocomment.jpg/

In IE with comment: http://imageshack.us/photo/my-images/13/iecomment.jpg/

In Firefox with comment: http://imageshack.us/photo/my-images/217/firefoxcomment.jpg/

The bug happens here:

In Firefox with no comment: http://imageshack.us/photo/my-images/444/firefoxnocomment.jpg/

For some reason, the UI shows X X X X X and the top bar is buggy...I have NO idea why it would do that in Firefox when there is no answer for the question..

To workaround this, I tried to download YUI 3 Editor, but I can't seem to be able to add the toolbar proprieties correctly. All I want is a workable text area to put things in bold, specify colors, etc (basic stuff). If you can provide me an editor that will do that, i would be very happy.

If you need other information, let me know, thanks.

Here is the code: http://pastebin.com/yiEiYH2V


Solution

  • The default margin is specified for Firefox as:

    $(".test_div").css("margin-top","5px");
    

    This is revealing the xxxx toolbar placeholder labels which are hidden otherwise. Adding a comment suppresses the margin due to collapsing margins.