Automatic text wrapping

How to automatically wrap long texts in Anqi CMS templates according to the specified length?

wordwrapFilters can wrap long texts automatically to the specified length.wordwrapThe words will be distinguished by spaces. If it does not contain spaces, it is counted as a word. Therefore, if it is a continuous Chinese word, it will not be wrapped.

How to use

wordwrapHow to use filters:

{{ obj|wordwrap:number }}

Sample Demo

{{ ""|wordwrap:2 }}
{% filter wordwrap:5 %}{% lorem 26 w %}{% endfilter %}

Show results

Lorem ipsum dolor sit amet,
consectetur adipisici elit, sed eiusmod
tempor incidunt ut labore et
dolore magna aliqua. Ut enim
ad minimum veniam, quis nostrud
exercitation