JSFiddle - React, Tailwind, and code Playground
by rich_harris
HTML
<script src="http://cdn.ractivejs.org/edge/ractive.js"></script>
<main></main>
<script id='template' type='text/ractive'>
<button on-click='print'>print ractive.data to console</button>
<input type='text' value="{{options.sharing['twitter-tweet'].via}}"/>
<span>{{options.sharing['twitter-tweet'].via}}</span>
</script>
CSS
body {
font-family: 'Helvetica Neue', arial, sans-serif;
font-weight: 200;
color: #353535;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 200;
}
table {
text-align: left;
}
JavaScript
var ractive = new Ractive({
el: 'main',
template: '#template'
});
ractive.on( 'print', function () {
console.log( ractive.data );
});