javascriptcsstelerikradeditorinline-styles

Telerik RadEditor for MOSS - How do I suppress min-width inline CSS?


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">

Solution

  • 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");
                }
            });
        }
    );