Skip to content

Instantly share code, notes, and snippets.

@gyllstromk
Last active April 13, 2023 19:33
Show Gist options
  • Save gyllstromk/5409699 to your computer and use it in GitHub Desktop.
Save gyllstromk/5409699 to your computer and use it in GitHub Desktop.
Render markdown as HTML in Ember via `registerBoundHelper`. This example uses https://github.com/evilstreak/markdown-js.
Ember.Handlebars.registerBoundHelper('markdown', function (content) {
return new Handlebars.SafeString(markdown.toHTML(content));
});
My markdown as HTML looks like:
{{markdown myObject.markdownFormattedContent}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment