This question is locked. New answers and comments are not allowed.
This line here in EditorHtmlBuilder:
is annoying me severely. I'm trying to Decode the value before its output because something somewhere (possibly the model binder) is encoding it on it's way to the database. One it's way back it's appearing in the editor as escaped html.
So I changed my editor template to do this (with HtmlDecode call)
Only to discover it's ignoring what's passed in. MS likes doing this sort of thing too. If I specify a value I won't the component to use that value. Reading stuff from the ViewData should be the fallback not the other way around!
This line should be:
var value = editor.ViewContext.ViewData.Eval(editor.Name) ?? editor.Value;
is annoying me severely. I'm trying to Decode the value before its output because something somewhere (possibly the model binder) is encoding it on it's way to the database. One it's way back it's appearing in the editor as escaped html.
So I changed my editor template to do this (with HtmlDecode call)
Html.Telerik().Editor().Name(ViewData.TemplateInfo.GetFullHtmlFieldName("")).Tools((p) =>
{
p.Clear();
p.FormatBlock().Bold().Italic().Underline().Strikethrough().JustifyLeft().JustifyCenter().JustifyRight().JustifyFull().InsertOrderedList().InsertUnorderedList().Indent().Outdent().CreateLink().Unlink().InsertImage();
}).Value(Server.HtmlDecode(Convert.ToString(Model))).Render();
Only to discover it's ignoring what's passed in. MS likes doing this sort of thing too. If I specify a value I won't the component to use that value. Reading stuff from the ViewData should be the fallback not the other way around!
This line should be:
var value = editor.Value ?? editor.ViewContext.ViewData.Eval(editor.Name);