I'm using the built in Markdown Editor available in the property editor drop down (Umbraco.MarkdownEditor). I'm using 7.1.8. Maybe I'm missing it somewhere..but I don't see any documentation on how to convert the markdown to html when redering. I'm sure I could figure out a way to render it from an outside library or creating something myself, but I would think if Umbraco included it they would have a default way of converting. Any thoughts?
I'm not sure whether the build in Markdown Editor is the same as Runes simple markdown editor package http://our.umbraco.org/projects/backoffice-extensions/simple-markdown - But perhaps you could try installing and using that? In the "Documentation" tab on the package page it seems there is some documentation about how to use it.
Just hit the same question... so I looked at how our expert Shannon does it in his blog package Articulate... looks like although there is a Markdown editor in Core, there is no rendering solution built-in. In Articulate, Shannon references (via NuGet) the MarkdownDeep solution and then does something along...
var val = content.GetPropertyValue<string>("markdown"); var md = new MarkdownDeep.Markdown(); return new MvcHtmlString(md.Transform(val));
public IHtmlString Body
{
get
{
if (this.HasProperty("richText"))
{
return this.GetPropertyValue<IHtmlString>("richText");
}
else
{
var val = this.GetPropertyValue<string>("markdown");
var md = new MarkdownDeep.Markdown();
UmbracoConfig.For.ArticulateOptions().MarkdownDeepOptionsCallBack(md);
return new MvcHtmlString(md.Transform(val));
}
}
}
Markdown Editor Output Rendering
I'm using the built in Markdown Editor available in the property editor drop down (Umbraco.MarkdownEditor). I'm using 7.1.8. Maybe I'm missing it somewhere..but I don't see any documentation on how to convert the markdown to html when redering. I'm sure I could figure out a way to render it from an outside library or creating something myself, but I would think if Umbraco included it they would have a default way of converting. Any thoughts?
Thanks!
Anybody used the markdown editor at all? Even using their own rendering?
Hi Kelsee
I'm not sure whether the build in Markdown Editor is the same as Runes simple markdown editor package http://our.umbraco.org/projects/backoffice-extensions/simple-markdown - But perhaps you could try installing and using that? In the "Documentation" tab on the package page it seems there is some documentation about how to use it.
Hope this helps.
/Jan
Thanks for the suggestion Jan!
Just hit the same question... so I looked at how our expert Shannon does it in his blog package Articulate... looks like although there is a Markdown editor in Core, there is no rendering solution built-in. In Articulate, Shannon references (via NuGet) the MarkdownDeep solution and then does something along...
To render the content.
here is the source: https://github.com/Shazwazza/Articulate/blob/fd43d5c69574f4067ce564d79640a83d27651b9a/src/Articulate/Models/PostModel.cs
Thank you, Stephen!
Hrm this should be added to the property editor as a default resolver.
is working on a reply...