html - Add anchor to javascript array for use with handlebars.js -
i have number of arrays stored in javascript variable. example of 1 of arrays is:
{ index: 6, template: 2, title: "innovation center", shortname: 'innov', projectactive: 'true', subtitle: "construct", location: "alaska", x: 1304, y: 610, image1: "img/watt.jpg", image2: "img/image_2.jpg", bgimage: "img/bgimage.jpg", headline1: "catapulting ideas reality", paragraph1: "a long paragraph of text", headline2: "the future won't wait, , neither we", paragraph2: "this long paragraph of text", listtitle: "innovative resources include: ", listitems: [ { item: "visual analytics" }, { item: "communication skills development" }, ] },
this printed html using handlebars.js this:
<div class="header" style="background-image: url( {{ bgimage }} );" > <div class="container"> <div class="col-sm-12"> <h1> {{ title }} </h1> <h4> {{ subtitle }} </h4> </div> </div> </div> <div class="container"> <div class="row paragraph1"> <div class="col-sm-6" > <div class="image1" style="background-image: url( {{image1}} );"> </div> </div> <div class="col-sm-6"> <h2> {{ headline1 }}</h2> <p> {{ paragraph1 }} </p> </div> </div>
my question how can wrap of text in 'paragraph' key value using html. is:
paragraph1: "a long <a href="google.com">paragraph</a> of text",
but spitting out code on page. appreciated.
Comments
Post a Comment