I have used jQuery to highlight some text. Is it possible to remove these words from textarea
.
<textarea cols="50" rows="5">...</textarea>
<script>
$('textarea').highlightTextarea({
color: '#ADF0FF',
words: ['Lorem ipsum', 'vulputate'],
resizable: true
});
</script>
Before submit your form you can get textarea value and replace your word with blank using loop like this.
var words = ['Lorem ipsum', 'vulputate'];
var result=$('#txtContain').text();
$.each( words, function( index, value ){
result = result.replace(value,'');
});
console.log(result.trim());
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<textarea cols="50" rows="5" id='txtContain'>Lorem ipsum is vulputate simply dummy text of the printing and typesetting industry. </textarea>
</div>