Merge branch 'templates' into develop

This commit is contained in:
Michael Teeuw
2017-10-01 13:10:25 +02:00
10 changed files with 7186 additions and 21 deletions

View File

@@ -0,0 +1,5 @@
<!--
Use | striptags(true) for HTML rendering
https://mozilla.github.io/nunjucks/templating.html#striptags-value-preserve_linebreaks
-->
<div class="normal">{{text | striptags(true)}}</div>

View File

@@ -14,10 +14,11 @@ Module.register("helloworld",{
text: "Hello World!"
},
// Override dom generator.
getDom: function() {
var wrapper = document.createElement("div");
wrapper.innerHTML = this.config.text;
return wrapper;
getTemplate: function () {
return "helloworld.html"
},
getTemplateData: function () {
return this.config
}
});