Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ollie_123's avatar

Tiny MCE WYSIWYG Not saving images or videos

Hi All

I've implemented the Tiny MCE WYSWYG editor into a livewire project and I'm racking my brains & to figure out why it wont allow me to save the embedded video or an image to the database within the text. When i add them into the editor i can see them before i click save but once saved there is no image or video data.

I also did a dd() before it saves i can see all the text but no image or video text.

Please can someone advise where i might be going wrong or what i'm missing.

Thanks in advance

0 likes
2 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

It's possible that the issue is related to the configuration of TinyMCE. Make sure that you have enabled the appropriate plugins for handling images and videos. Additionally, check that the form you are using to submit the data is set up correctly to handle file uploads.

Here's an example configuration for TinyMCE that includes the necessary plugins:

tinymce.init({
  selector: 'textarea',
  plugins: 'image media',
  toolbar: 'undo redo | bold italic | image media',
  media_live_embeds: true
});

Make sure that your form includes the enctype="multipart/form-data" attribute to enable file uploads:

<form method="POST" action="/submit" enctype="multipart/form-data">
  <textarea name="content"></textarea>
  <input type="file" name="image">
  <input type="file" name="video">
  <button type="submit">Save</button>
</form>

If you're still having issues, try checking the network tab in your browser's developer tools to see if the image or video data is being sent to the server correctly.

Please or to participate in this conversation.