How to add strip tags in drupal 8? How to add strip tag in field template i am using ckeditor in my content type because of using it its automatically inserting p tags in Text.

Here is mine field template code

         {% for item in items %}
     &lt;div{{ attributes.addClass(classes, 'field--item') }}&gt;{{ item.content }}&lt;/div&gt;
{% endfor %}


I was trying something like this for adding strip tags

{% for item in items %}
{% set conBody %}
 {{ item.content }}
 {% endset %}   

{{ conBody|striptags }}

 &lt;div{{ attributes.addClass(classes, 'field--item') }}&gt;{{ conBody  }}&lt;/div&gt;
{% endfor %}


Only indexed value(conBody[0]) field tags are stripped(p tags removed) but remaining indexed value fields are remaining same not affected.

How could i use above code in loop.
I ran across this today and figured I would circle back and provide an answer that worked for me.

{% for item in items %}
    {% set conBody %}
        {{ item.content }}
    {% endset %}
&lt;div class="myClass"&gt;{{ conBody|striptags }}&lt;/div&gt;
{% endfor %}