We have a text (formatted, long) field that is used to insert embed code such as the Youtube embed code for videos.
When printing the field in twig we are finding that rather than rendering the embed code, it is displaying the embed code as string. To get around this, we currently apply Twig's Raw filter, but wanted to see if there was a way to not use the raw filter and render the field as is.
Content type (basic page):
- body (text, formatted long) field
- title
Current results (inserted into Body field using Full HTML text format, displayed as string):
<script type="text/javascript" id="vidyard_embed_code_SkWfXrpFKFpS9JrytJwqMt" src="//play.vidyard.com/SkWfXrpFKFpS9JrytJwqMt.js?v=3.1.1&type=lightbox"></script><div class="outer_vidyard_wrapper"><div class="vidyard_wrapper" onclick="fn_vidyard_SkWfXrpFKFpS9JrytJwqMt();"><img width="360" src="//play.vidyard.com/SkWfXrpFKFpS9JrytJwqMt.jpg?" alt="Generating Leads with Video Content"><div class="vidyard_play_button"><a href="javascript:void(0);"></a></div></div></div>
Desired results (output of body field shows the video)