Answers.Body: <p>I would personally advise a matrix field and allow a mix of block types instead of trying to push code into the Redactor field. This can open you up to security vulnerabilities.</p>
  <p>To learn more about the Matrix field type you can see the docs: <a href="https://craftcms.com/docs/4.x/matrix-fields.html" rel="nofollow noreferrer">https://craftcms.com/docs/4.x/matrix-fields.html</a></p>
  <hr />
  <p>That being said if you <em>really</em> want to open up the possibility of adding video embed code into your Redactor field you can check if the config settings include <code>&quot;plugins:&quot; [&quot;fullscreen&quot;, &quot;video&quot;]</code> and <code>&quot;allowedTags&quot;: [&quot;iframe&quot;]</code>.</p>
  <p>To check this it would be /web/config/redactor/[whatever json you want to apply this to]</p>
  <p>You can create multiple json configs for Redactor as well. <a href="https://github.com/craftcms/redactor" rel="nofollow noreferrer">https://github.com/craftcms/redactor</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-15T12:00:09.750Z
Answers.Text: Thanks — matrix isn’t an option in this circumstance, it would mean recoding the templates.
  
  The video button is enabled, and works fine with YouTube and Vimeo embeds, just not valid HTML video code.
Answers.UserDisplayName: mitrol
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-15T18:28:46.297Z
Answers.Text: You could also try adding "html" to the buttons array in the config setting json file. I hope this helps!
Answers.UserDisplayName: kelly
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-17T12:23:39.830Z
Answers.Text: Thanks @kelly, but that’s there too. I ended up turning off the HTMLPurifier for the field, but it’s not exactly ideal.
Answers.UserDisplayName: mitrol
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-01-11T23:18:16.337Z
Answers.LastActivityDate: 2024-01-11T23:18:16.337Z
Answers.UserDisplayName: kelly
Body: <p>I’m embedding a video.</p>
  <p>I have the video button set up for my Redactor field. I use it to insert a video element.</p>
  <p>When I save Redactor strips the code out and replaces it with an empty figure element.</p>
  <p>Any idea how to stop Redactor doing that?</p>
  
Tags: <redactor><video>
Title: Redactor strips out video tags
ThreadText: # Redactor strips out video tags
  
  (Asked by: username_0 on 2024-01-09)
  
  I’m embedding a video.
  
  I have the video button set up for my Redactor field. I use it to insert a video element.
  
  When I save Redactor strips the code out and replaces it with an empty figure element.
  
  Any idea how to stop Redactor doing that?
  
  **Tags:** redactor, video
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-01-11. Score: 2
  
  I would personally advise a matrix field and allow a mix of block types instead of trying to push code into the Redactor field. This can open you up to security vulnerabilities.
  
  To learn more about the Matrix field type you can see the docs: <https://craftcms.com/docs/4.x/matrix-fields.html>
  
  ---
  
  That being said if you *really* want to open up the possibility of adding video embed code into your Redactor field you can check if the config settings include `"plugins:" ["fullscreen", "video"]` and `"allowedTags": ["iframe"]`.
  
  To check this it would be /web/config/redactor/[whatever json you want to apply this to]
  
  You can create multiple json configs for Redactor as well. <https://github.com/craftcms/redactor>
  
  > **Comments:**
  > **username_0**: Thanks — matrix isn’t an option in this circumstance, it would mean recoding the templates.  The video button is enabled, and works fine with YouTube and Vimeo embeds, just not valid HTML video code.  
  > **username_1**: You could also try adding "html" to the buttons array in the config setting json file. I hope this helps!  
  > **username_0**: Thanks @username_1, but that’s there too. I ended up turning off the HTMLPurifier for the field, but it’s not exactly ideal.  
  
  ---
  
  