var template = new plate.Template(jinja_template) var context = jsyaml.load(document.getElementById("yaml_data").innerHTML); console.log(yaml_data); template.render(context, function(err, data) { if (err) throw err; document.getElementById("my_card").innerHTML = data; // document.write(data); })