Twig Trim Body Summary for templates Code

<div class="summary">
 {% set text = content.body['#object'].body.summary|render %}
{{ text|length > 80 ? text|slice(0, 80)|raw ~ '...' : text|raw }}
{% set text = content.body['#object'].body.summary|render|striptags %}
{{ text|length > 80 ? text|slice(0, 80) ~ '...' : text }}
      
  </div>