What is @ckeditor/ckeditor5-media-embed?
@ckeditor/ckeditor5-media-embed is a plugin for CKEditor 5 that allows users to embed media such as videos and audio from various sources like YouTube, Vimeo, and more. It provides a user-friendly interface for embedding media content directly into the editor.
What are @ckeditor/ckeditor5-media-embed's main functionalities?
Embedding Media
This feature allows users to embed media content from various sources directly into the CKEditor 5 instance. The code sample demonstrates how to initialize CKEditor 5 with the MediaEmbed plugin and add the media embed button to the toolbar.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ MediaEmbed, ... ], toolbar: [ 'mediaEmbed', ... ] })
Custom Media Providers
This feature allows users to define custom media providers for embedding media content. The code sample shows how to configure CKEditor 5 to recognize and embed media from a custom provider.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ MediaEmbed, ... ], mediaEmbed: { providers: [ { name: 'customProvider', url: /customProvider\.com\/media\/([a-zA-Z0-9]+)/, html: match => `<iframe src="https://customProvider.com/media/${match[1]}"></iframe>` } ] } })
Responsive Media Embeds
This feature ensures that embedded media is responsive and adapts to different screen sizes. The code sample demonstrates how to enable responsive media embeds by setting the 'previewsInData' option to true.
ClassicEditor.create(document.querySelector('#editor'), { plugins: [ MediaEmbed, ... ], mediaEmbed: { previewsInData: true } })
Other packages similar to @ckeditor/ckeditor5-media-embed
react-player
react-player is a React component for playing various types of media, including YouTube, Vimeo, SoundCloud, and more. It provides a simple interface for embedding media in React applications. Compared to @ckeditor/ckeditor5-media-embed, react-player is more focused on media playback within React applications rather than being a plugin for a rich text editor.
video.js
video.js is a popular open-source HTML5 video player that supports a wide range of video formats and provides a customizable player interface. While video.js is primarily focused on video playback, it can be integrated into web applications to provide advanced video embedding and playback features. Unlike @ckeditor/ckeditor5-media-embed, video.js is not a text editor plugin but a standalone video player.
plyr
plyr is a simple, customizable HTML5 media player that supports video, audio, and YouTube embeds. It offers a clean and modern interface for media playback. Plyr can be used to embed media content in web applications, but it does not provide the rich text editing capabilities of CKEditor 5. Compared to @ckeditor/ckeditor5-media-embed, plyr is more focused on media playback rather than being an editor plugin.
43.1.1 (September 25, 2024)
We are happy to announce the release of CKEditor 5 v43.1.1.
During a recent internal audit, we identified a Cross-Site Scripting (XSS) vulnerability in the CKEditor 5 clipboard package (CVE-2024-45613
). This vulnerability could be triggered by a specific user action, leading to unauthorized JavaScript code execution, if the attacker managed to insert malicious content into the editor, which might happen with a very specific editor configuration.
This vulnerability affects only installations where the editor configuration meets the following criteria:
- The Block Toolbar plugin is enabled.
- One of the following plugins is also enabled:
You can read more details in the relevant security advisory and contact us if you have more questions.
Taking the occasion, we decided to introduce additional hardening to some parts of our codebase that introduce theoretical and unexploitable issues. Our security team confirmed that none of these issues were exploitable in a real scenario, however, we decided to fix them, in order to increase the overall security posture of our software.
Released packages
Check out the Versioning policy guide for more information.
<details>
<summary>Released packages (summary)</summary>
Other releases:
</details>