Hi, I have a grid with the editable mode set to popup like so:
And then "EmailTemplate" looks like so:
Everything works as expected except the Editor does not show the contents of the "Body" field and when I post the form back the contents of EmailTemplate.Body is null. All the other fields save and display fine. And if I bind "Body" to a normal text area it works fine too, so the problem lies somewhere in my implementation of the Kendo UI Editor.
.Editable(editable => { editable.Mode(GridEditMode.PopUp); editable.TemplateName(
"EmailTemplate"
); })
@model Young_Ealing.Models.EmailTemplate
@Html.LabelFor(m=>m.Name)
@Html.TextBoxFor(m=>m.Name)
@Html.LabelFor(m=>m.Subject)
@Html.TextBoxFor(m=>m.Subject)
@Html.LabelFor(m=>m.Body)
@(Html.Kendo().EditorFor(m=>m.Body).Name(
"Body"
).Tools(tools => tools.FontName().Bold().Clear().CreateLink().FontSize().FormatBlock().Indent()
.InsertImage().InsertOrderedList().InsertUnorderedList().Italic().JustifyCenter()
.JustifyFull().JustifyLeft().JustifyRight().Outdent().Separator().Strikethrough()
.SubScript().SuperScript().Underline().Unlink().ViewHtml().CustomButton(cb => cb.Name(
"add_name"
).ToolTip(
"insert individual name"
).Exec(@<text>
function(e) {
var editor = $(
this
).data(
"kendoEditor"
);
editor.exec(
"inserthtml"
, { value:
"@(Young_Ealing.Code.EmailUtils.TEMPLATE_INDIVIDUAL_NAME)"
});
}
</text>))).HtmlAttributes(
new
{ style =
"width: 785px;height:295px;"
}))
@Html.LabelFor(m => m.IsHtml)
@Html.CheckBoxFor(m => m.IsHtml)
<div
class
=
"clear"
></div>