I currently making a site witch have blog(I m using quill more precisely react-quilljs) and i want to add to blog card short description for now i have
const jsonText = JSON.parse(article.body);
let text = jsonText.ops[0].insert;
this is sample data i get from delta object
ops:[
insert:"text ...."
]
I want to have possibility to make for example description that doesnt cut words and show less than 50 words. And if its possible to render only text words without any header attributes. Is it any option to achive it or i must stay with thing i use for now.
You can try text-overflow text-overflow I added one example.
div.b {
white-space: nowrap;
width: 250px;
overflow: hidden;
text-overflow: ellipsis;
border: 1px solid #000000;
}
<div class="b">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release</div>