Skip to content

Instantly share code, notes, and snippets.

@vadimdemedes
Last active December 15, 2015 20:40
Show Gist options
  • Save vadimdemedes/5320057 to your computer and use it in GitHub Desktop.
Save vadimdemedes/5320057 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Example view</title>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//s3.amazonaws.com/cdn.getchute.com/chute-js/v1/chute.min.js" data-load="view"></script>
<script class="editor-template" type="application/x-template">
<div class="editor-view">
<textarea></textarea>
<span class="word-counter">0 words</span>
</div>
</script>
<script>
Chute.ready(function(){
var EditorView = Chute.View.extend({
template: 'script.editor-template',
dependencies: ['style.css']
});
});
</script>
</head>
<body>
</body>
</html>
div.editor-view {
overflow:hidden;
width:500px;
}
div.editor-view textarea {
width:400px;
float:left;
}
div.editor-view span.word-counter {
float:left;
margin-left:20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment