New option in Media plugin settings to add a callback for external embeds
See original GitHub issueI need to wrap the embeds/iframes with a div
in order to make them responsive. For now the only way I found to do that is implementing a new plugin for pasting the iframe code. I think it’s a waste of time making a new plugin just for that, so it would be better/easier if the Media plugin would allow adding a callback for embeds in the same way than video_template_callback
for videos. Something like embed_template_callback
.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:6
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Media plugin | Docs - TinyMCE
The media plugin adds the ability for users to be able to add HTML5 video and audio elements to the editable area. It...
Read more >Embed Options and Plugins — Support - Wistia
Setting options using the Customize API You can update embed options saved within the Wistia app using the API. This way, wherever you...
Read more >CKEditor Media Embed Plugin | Drupal.org
During content creation the author may add embed resources (videos, images, tweets, etc.) hosted by other services (called the "content ...
Read more >Media embed - CKEditor 5 Documentation
The media embed feature brings support for inserting embeddable media such as YouTube or Vimeo videos and tweets into your rich text content....
Read more >api - Kaltura Player
The kWidget API object, used to create new instances of Kaltura API request. ... top level configuration options; plugins configuration options.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1
Also when putting a YouTube or Vimeo link in Source field, the editor ignores my “video_template_callback” and puts its own code?
We need to be able to control the markup for all videos and embeds.
@thedrjim It would be great to have a “iframe_template_callback” setting for the media plugin.
Workaround in the meantime: https://github.com/tinymce/tinymce/blob/e25ec422bcf3889fc47aa46f0a230666a21b5e22/modules/tinymce/src/plugins/media/main/ts/core/DataToHtml.ts#L22 I tracked down the template code (☝️), and put in a dirty workaround in one of my (ruby on rails) helper’s:
And an example of using it in one of my views:
Not ideal, but it’s working for us.