Files
LeafWeb/WebCms/Views/Partials/Grid/Editors/Textstring.cshtml
T
2018-09-16 15:08:47 -04:00

25 lines
638 B
Plaintext

@model dynamic
@using Umbraco.Web.Templates
@if (Model.editor.config.markup != null)
{
string markup = Model.editor.config.markup.ToString();
var umbracoHelper = new UmbracoHelper(UmbracoContext.Current);
markup = markup.Replace("#value#", umbracoHelper.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode(Model.value.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>
}