| + @Html.Raw(cell.Value) + | + } +
|---|
| + @Html.Raw(cell.Value) + | + } +
@ex.ToString()+} + +@functions{ + + public static string EditorView(dynamic contentItem) + { + string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); + view = view.ToLower().Replace(".html", ".cshtml"); + + if (!view.Contains("/")) + { + view = "grid/editors/" + view; + } + + return view; + } +} diff --git a/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/embed.cshtml b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/embed.cshtml new file mode 100644 index 0000000..a383046 --- /dev/null +++ b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/embed.cshtml @@ -0,0 +1,10 @@ +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
@Model.value.caption
+ } +} diff --git a/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/rte.cshtml b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/rte.cshtml new file mode 100644 index 0000000..e14c6e1 --- /dev/null +++ b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/rte.cshtml @@ -0,0 +1,13 @@ +@using Umbraco.Cms.Core.Templates +@model dynamic +@inject HtmlLocalLinkParser HtmlLocalLinkParser; +@inject HtmlUrlParser HtmlUrlParser; +@inject HtmlImageSourceParser HtmlImageSourceParser; + +@{ + var value = HtmlLocalLinkParser.EnsureInternalLinks(Model.value.ToString()); + value = HtmlUrlParser.EnsureUrls(value); + value = HtmlImageSourceParser.EnsureImageSources(value); +} + +@Html.Raw(value) diff --git a/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/textstring.cshtml b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/textstring.cshtml new file mode 100644 index 0000000..42972f6 --- /dev/null +++ b/samples/Our.Umbraco.Tables.Demo.v9/Views/Partials/grid/editors/textstring.cshtml @@ -0,0 +1,23 @@ +@using System.Web +@model dynamic + +@if (Model.editor.config.markup != null) +{ + string markup = Model.editor.config.markup.ToString(); + markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString()); + + if (Model.editor.config.style != null) + { + markup = markup.Replace("#style#", Model.editor.config.style.ToString()); + } + +
You have reached the end of the {{model.name}} tour - way to go!
We lost the next step {{ model.currentStep.title }} and don\'t know where to go.
Please go back and start the tour again.
{{a11yMessage}}
{{accessibility.a11yMessage}}
{{ description }}