Answers.Body: <p>If you're trying to remove HTML tags from the output completely, you can use Twig's <code>striptags</code> filter: <a href="https://twig.symfony.com/doc/2.x/filters/striptags.html" rel="nofollow noreferrer">https://twig.symfony.com/doc/2.x/filters/striptags.html</a>.</p>
  
  <p>If you want to retain the tags but show the output without any styling, you're going to have to handle that with your CSS by negating any of the existing styling you don't want.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-09T06:08:30.643Z
Answers.Text: Thanks. It working now. The reason why I want to remove the HTML tags is that it break my code structure when there is a bold <strong> tag. Not sure what is the reason, so I decided to just output plain text. The result become like this <br... <="" div="">, do you know what is the reason?
Answers.UserDisplayName: Lee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-09T04:41:02.717Z
Answers.LastActivityDate: 2020-04-09T04:41:02.717Z
Answers.UserDisplayName: Evan Warner
Body: <p>Is there a way to display plain text only without any line break or format style. I have an input field using the redactor. I want the result to shows plain text without any formatting for this particular page. How can I modify it?</p>
  
  <pre><code>{% set desc = desc|slice(0,150) %}
  {% set _desc = desc|split(' ') %}
  {% set __desc = _desc|slice(0,-1) %}
  {% set desc = __desc|join(' ') %}
  {{desc|raw}}
  </code></pre>
  
  <p>Thanks.</p>
  
Tags: <templating><redactor><plaintext>
Title: How to display plain text only from redactor without any line break or format
ThreadText: # How to display plain text only from redactor without any line break or format
  
  (Asked by: username_0 on 2020-04-09)
  
  Is there a way to display plain text only without any line break or format style. I have an input field using the redactor. I want the result to shows plain text without any formatting for this particular page. How can I modify it?
  
  ```
  {% set desc = desc|slice(0,150) %}
  {% set _desc = desc|split(' ') %}
  {% set __desc = _desc|slice(0,-1) %}
  {% set desc = __desc|join(' ') %}
  {{desc|raw}}
  
  ```
  
  Thanks.
  
  **Tags:** templating, redactor, plaintext
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-04-09. Score: 1 | Accepted answer
  
  If you're trying to remove HTML tags from the output completely, you can use Twig's `striptags` filter: <https://twig.symfony.com/doc/2.x/filters/striptags.html>.
  
  If you want to retain the tags but show the output without any styling, you're going to have to handle that with your CSS by negating any of the existing styling you don't want.
  
  > **Comments:**
  > **username_0**: Thanks. It working now. The reason why I want to remove the HTML tags is that it break my code structure when there is a bold <strong> tag. Not sure what is the reason, so I decided to just output plain text. The result become like this <br... <="" div="">, do you know what is the reason?  
  
  ---
  
  