Skip to content

Commit

Permalink
markdown render hb template for md display
Browse files Browse the repository at this point in the history
  • Loading branch information
mibewh committed Nov 29, 2023
1 parent 6688fe7 commit 979e4d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/HandlebarsTemplateEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@

});

Handlebars.registerHelper("markdown", function(text) {
return SimpleMDE.prototype.markdown(text);
});

//Handlebars.registerHelper("each", helpers["each"]);
Handlebars.registerHelper("compare", helpers["compare"]);
Handlebars.registerHelper("control", helpers["control"]);
Expand Down
7 changes: 7 additions & 0 deletions src/templates/web-display/control-markdown.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script type="text/x-handlebars-template">

<p>
{{#markdown data}}{{/markdown}}
</p>

</script>

0 comments on commit 979e4d1

Please sign in to comment.