Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Center align in CKEditor not work for "Embed Media".
1. Insert youtube code, used button "Embed Media" in CKEditor. Code:
<p>
<div class="media_embed" height="360px" width="480px">
<iframe allowfullscreen="" frameborder="0" height="360px" src="http://www.youtube.com/embed/n1bxT..." width="480px"></iframe></div>
</p>
2. Select embed object in editor and click button "Center". Code after this:
<p class="rtecenter">
<div class="media_embed" height="360px" width="480px">
<iframe allowfullscreen="" frameborder="0" height="360px" src="http://www.youtube.com/embed/n1bxT..." width="480px"></iframe></div>
</p>
3. Save node.
4. Code embed after save:
<p class="rtecenter"> </p>
<div class="media_embed" height="360px" width="480px">
<iframe allowfullscreen="" frameborder="0" height="360px" src="http://www.youtube.com/embed/n1bxT..." width="480px"></iframe></div>
<p> </p>