JSFiddle - React, Tailwind, and code Playground

by steverob

HTML

<script src='http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js'></script>

<body>
    <h3>HTML tag test</h3>
    <div class='target'>
    </div>
</body>

<script type='text/x-jquery-tmpl' id='template'>
  <div class='html-test'>
      <p> Without HTML tag: ${ Text }</p>
      <p> With HTML tag: {{html Text}}</p>
  </div>
</script>

JavaScript

var steve = {'Text':'<strong>Testing</strong>'};

$(document).ready(function(){
    $('#template').tmpl(steve).appendTo('.target');
});