Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
Custom html when inserting iframe TinyMCE

I'm using a rich text field editor, so the user requires 0 HTML knowledge. In the backend, I will handle making the elements responsive by wrapping the necessary elements inside a div. The way TinyMce works is that you can press buttons to add chunks of HTML, like an image or iframe. TinyMCE At the top you can insert images and videos. My goal is to change that insert button so it wraps it with a div that makes it responsive.

I want to wrap an iframe with div so it becomes responsive. Let's say I add an iframe, I want to wrap that iframe with a div so it is made responsive. I have tried javascript, where it searches the doc for iframes and wraps them, but this seems unnecessarily complicated. Essentially I just want to change the button that inserts iframes to have a div around.

from

<iframe src="https://www.youtube.com/embed/or1DfXdqu3U" width="560" height="314" allowfullscreen="allowfullscreen"></iframe>

to

<div class="ratio">
<iframe src="https://www.youtube.com/embed/or1DfXdqu3U" width="560" height="314" allowfullscreen="allowfullscreen"></iframe>
</div>

I found this, but unfortunately, I don't understand how this can be applied to what I am trying to do. But it does seem significant http://archive.tinymce.com/forum/viewtopic.php?id=25649

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!