How to create a new line when text overflows row?

515 Views Asked by At

When creating a new img holder:

<img src="holder.js/200x75/industrial/text:this text is too long for only one row">

There is no enough space in one row to hold the text, and I can't get a hold of how to do break for new line.

Does anyone have an idea?

thanks

2

There are 2 best solutions below

0
On

Line breaks are now added: https://github.com/imsky/holder#text

<img data-src="holder.js/300x200?text=Add \n line breaks \n anywhere.">
0
On

Check your syntax and settings. Or try to update the Holder.js.

Holder automatically adds line breaks to text that goes outside of the image boundaries.

This code works as it should:

<script src="https://cdn.rawgit.com/imsky/holder/master/holder.js"></script>

<img src="holder.js/200x75/industrial?text=this text is too long for only one row">