Files
Umbraco-CMS/src/Umbraco.Web.UI/Views/Partials/Grid/Editors/TextString.cshtml
T

25 lines
599 B
Plaintext

@model dynamic
@using Umbraco.Web.Composing
@using Umbraco.Web.Templates
@if (Model.editor.config.markup != null)
{
string markup = Model.editor.config.markup.ToString();
markup = markup.Replace("#value#", Html.ReplaceLineBreaks(HttpUtility.HtmlEncode((string)Model.value.ToString())).ToString());
if (Model.editor.config.style != null)
{
markup = markup.Replace("#style#", Model.editor.config.style.ToString());
}
<text>
@Html.Raw(markup)
</text>
}
else
{
<text>
<div style="@Model.editor.config.style">@Model.value</div>
</text>
}