JSFiddle - React, Tailwind, and code Playground
HTML
<h3>Type more than 50 characters</h3>
<textarea rows="6" cols="50"></textarea>
<br />
<p id="result"></p>
JavaScript
$('textarea').on('keyup', function() {
var v = this.value.length > 50 ? this.value.substr(0,45) : this.value;
v = v.split(/\s/);
v.pop();
v = v.join(' ') + ' (...)';
$('#result').text( v );
});