I would like to do something like:
Foreverywordtheusertypes,itlooksliketheimageabove.
TheclosestIcouldgetwastoknowthenumberofwordshetyped,followthecodebelow:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><divclass="row">
<div class="input-field col s12">
<input id="first_name" type="text" class="validate palavras-chaves">
<label for="first_name">Palavras Chaves</label>
</div>
</div>
<script type="text/javascript">
var palavrasChaves = $(".palavras-chaves");
palavrasChaves.on("input",function(){
var conteudo = palavrasChaves.val();
var qntdPalavras = conteudo.split(/\S+/).length -1;
console.log(qntdPalavras);
});
</script>