wekan/packages/markdown/template-integration.js
Lauri Ojansivu 73e265d8fd Include to Wekan packages directory contents, so that meteor command would build all directly.
This also simplifies build scripts.

Thanks to xet7 !
2019-04-20 15:18:33 +03:00

16 lines
437 B
JavaScript
Executable file

if (Package.ui) {
var Template = Package.templating.Template;
var UI = Package.ui.UI;
var HTML = Package.htmljs.HTML;
var Blaze = Package.blaze.Blaze; // implied by `ui`
UI.registerHelper('markdown', new Template('markdown', function () {
var self = this;
var text = "";
if(self.templateContentBlock) {
text = Blaze._toText(self.templateContentBlock, HTML.TEXTMODE.STRING);
}
return HTML.Raw(Markdown(text));
}));
}