I want to have a XHTMLString property so that the editors can edit the text as they want. I have tried with and without the attribute [UIHint(UIHint.LongString)] and it causes the same error:
Unable to cast object of type 'System.String' to type 'EPiServer.Core.XhtmlString'.
the code, HTML and EPiServer property:
<div>
@Model.CurrentPage.Text</div> [Display(
GroupName = SystemTabNames.Content,
Name = "Text",
Description = "The text",
Order = 1)]
[UIHint(UIHint.LongString)]
public virtual XhtmlString Text { get; set;}
What am I missing? I'm using EPiServer 7