This is a migrated thread and some comments may be shown as answers.

[Solved] Editor's IFrame rendered with attribute "classname" instead of "class"

3 Answers 27 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cornelis
Top achievements
Rank 1
Cornelis asked on 08 Jun 2011, 12:34 PM
hi there,

Using the Visual Studio Extensions I converted a regular ASP.NET MVC 3 to a Telerik MVC project and I have run into a problem regarding how the IFrame markup is rendered.

The IFrame element is rendered with an attribute of
classname="t-content"
instead of
class="t-content"

This messes up the formatting of the editable area (see screenshot attached) since the iframe's width is not 100%.
Using Firebug to change the attribute to "class" fixes it.

I am using version 2011.1.315.340 and Razor view engine.

When I create a Telerik MVC project using the new Project wizard, the markup is rendered correctly for the IFrame element and all is as expected.
This happens despite using the exact same Telerik.Mvc assemblies and the exact same code for the call to Html.Telerik().Editor().

Here is my view code (call to Telerik().Editor() near the bottom):
@model Uistir.Web.Models.TempViewModel
 
 
@{
    ViewBag.Title = "Scratch Page";
}
 
<h2>Templated HtmlHelpers</h2>
 
@using (Html.BeginForm("Index", "Temp", FormMethod.Post)) { 
    <fieldset>
        <div class="grid_6 alpha">
 
            @* Due input *@
            <div class="grid_1 alpha form-element-wrapper">
                @Html.LabelFor(m => m.Due)
            </div>
            <div class="grid_4 suffix_1 omega form-element-wrapper">
                @Html.EditorFor(m => m.Due)
            </div>
 
            @*User Selection*@
            <div class="grid_1 alpha form-element-wrapper">
                @Html.LabelFor(m => m.Users)
            </div>
            <div class="grid_4 suffix_1 omega form-element-wrapper">
                @Html.EditorFor(m => m.Users, null, "OwnerId")
            </div>
            
            @*Location Selection*@
            <div class="grid_1 alpha form-element-wrapper">
                @Html.LabelFor(m => m.Location)
            </div>
            <div class="grid_4 suffix_1 omega form-element-wrapper">
                @Html.EditorFor(m => m.Location)
            </div>
 
            @* Money input *@
            <div class="grid_1 alpha form-element-wrapper">
                @Html.LabelFor(m => m.Amount)
            </div>
            <div class="grid_4 suffix_1 omega form-element-wrapper">
                @Html.EditorFor(m => m.Amount)
            </div>
 
            
            <div class="grid_1 suffix_5 alpha omega  form-element-wrapper">
                @Html.SubmitButton("Submit", "Submit")
            </div>
        </div>
 
        <div class="grid_5 omega">
            <div class="form-element-wrapper">
                @Html.LabelFor(m => m.Description)
            </div>
            <div class="form-element-wrapper">
                @(Html.Telerik().Editor().Name("Editor").Value(@<text>Some text</text>))
            </div>
        </div>
 
    </fieldset>    

Any idea how or what is influencing the Editor rendering process to make this mistake?

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 08 Jun 2011, 01:17 PM
Hi Cornelis,

The issue is caused by a breaking change in jQuery 1.6. We have fixed it on our side and changes will take effect in the next internal build (to be available by the end of next week).

Kind regards,
Dimo
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Cornelis
Top achievements
Rank 1
answered on 08 Jun 2011, 01:36 PM
Many thanks for the quick reply!

I look forward to the next internal build.
0
Scott
Top achievements
Rank 1
answered on 11 Aug 2011, 05:46 PM
I ran into this same issue, adding an editor to one of my views.  I wasn't quite ready to update my Telerik tools yet (we are still trying to decide).  So, I hackily did this in my document ready:

    $(function () {
        $('#myEditor').load(function() {
            $('iframe[classname]').addClass('t-content').removeAttr('classname');
        });
    });

Poof!  Makes it all ok.
Tags
Editor
Asked by
Cornelis
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Cornelis
Top achievements
Rank 1
Scott
Top achievements
Rank 1
Share this question
or