I was moving my views to Drupal 8 and one of the things I need to do is display only text from the Node body. In Drupal 7 I had simply set the Body field display format to "Plain text" in Teaser view mode. This worked brilliantly, since it ignored HTML such as images (instead of displaying raw HTML which would not work). Most of my nodes have images near the beginning of the Body text so these images show up on my view and ruin it. I can't find the Plain Text field display format; has it been removed? Is this done differently now?

  • Do you have filter module installed? The plain text is installed by default, see core\modules\filter\config\install\filter.format.plain_text.yml – user21641 Dec 14 '15 at 14:55
  • I just checked. Filter is installed and that file is indeed present. The display filter only shows up for fields that are of field type "Text (plain)". But my Body field is of type "Text (formatted, long, with summary)" because HTML is supposed to show up. Just not on the Teaser view mode. – hanyuxuan Dec 14 '15 at 15:00

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.