I'm attempting to display a plain text field so that I can use it to embed youtube videos
In my template I have
<iframe width="420" height="315" src="https://www.youtube.com/embed/{{ content.field_video }}" frameborder="0" allowfullscreen></iframe>
However when it renders it produces a mess
<iframe width="420" height="315" src="https://www.youtube.com/embed/ <!-- THEME DEBUG --> <!-- THEME HOOK: 'field' --> <!-- FILE NAME SUGGESTIONS: * field--node--field-video--beer.html.twig * field--node--field-video.html.twig * field--node--beer.html.twig * field--field-video.html.twig * field--string.html.twig x field.html.twig --> <!-- BEGIN OUTPUT from 'core/themes/stable/templates/field/field.html.twig' --> <div data-quickedit-field-id=" node="" 15="" field_video="" en="" full"="">C0DPdy98e4c</div>
<!-- END OUTPUT from 'core/themes/stable/templates/field/field.html.twig' -->
" frameborder="0" allowfullscreen></iframe>
I understand that part of it is because I'm in debug mode, but it's also wrapping it in a quick edit field div. And even if it didn't I'd rather not exit debug mode just to work on this. Is there a way to output just the value and nothing more? Like something similar to {{ content.field_video.value }}?
If I can't disable quick edit field by field, is there a way to print a field while keeping the HTML intact? When I put the entire iframe into field it turns the html tags into text.
I tried
{{ content.field_video|raw }}
but the output still showed the html tags as text. I tried
{{ content.field_video.value|raw }}
But that did not show anything.