views:

348

answers:

2

I'm having an issue with the RadEditor for MOSS, I'm really baffled as to the source of this issue. I tried using Firebug to find where any min-* CSS settings are happening and search came up empty, but I know it's happening because the downloaded page markup does not have that inline CSS.

I believe that one of the Telerik control emitted Javascripts is what is adding inline CSS style to the top level div of the editor, namely min-height, min-width. This is causing layout issues on my page. My question is why is it doing this, and more importantly how do I prevent this from happening?

<div style="height: 300px; width: 100%; min-height: 300px; min-width: 1133px;"
 class="RadEditor Default reWrapper ms-input">
A: 

The min-width/height style is added from the editor. AFAIK there is no way to stop them from appearing unless you override the control's JavaScript. However, I don't think that this will help, since the styles are obviously tied to the editor size and if you remove them, the control's visual appearance is likely to break.

You should try to workaround the issue by modifying your page layout. For example - the MOSS pages are usually rendered in quirks mode and adding a valid XHTML doctype should change things for the better.

lingvomir
A: 

I ended up throwing down an override script, here it is in case you need it.

/*  
    Hack/Fix for Telerik editor controls, this removes the strange inline css property min-width that is being set somewhere deep in the Telerik scripts.
*/
$(document).ready
(
    function() {
        var items = $(".RadEditor").filter("div");
        items.each(function(index) {
            var that = $(this);
            if (that.css("min-width")) {
                that.css("min-width", "inherit")
            }
        });
    }
);
James