How to add the three dots at a position in the text and prevent these three dots from truncating any word or being placed after puntuation marks (.,;:)?
This is my javascript function
let parseText = function(text, limit){
return text.substring(0, limit) + '...';
};