Media Widget for CKEditor 5


403.0.42 years ago4 years agoMinified + gzip package size for @akilli/ckeditor5-media in KB



This media widget for CKEditor 5 can embed image, audio, video and iframe elements wrapped within a figure optionally with a caption. It also provides a minimal API to integrate a media browser by the use of the window.postMessage() function.

This widget will add the CSS class image, audio, video or iframe to the figure element. It also supports alignment by setting an appropriate CSS class (left or right), and the attributes width, height and alt. The controls(audio and video) and allowfullscreen (iframe) are automatically set.

Media Browser

You can implement your media browser as you wish, the only two requirements are that you configure the URL to your media browser as media.browser p.e.

const editorConfig = {
    media: {
        browser: '/url/to/mediabrowser',

and that your media browser notifies the editor by posting a message p.e. like

    alt: 'Optional alternative text',
    src: '/url/to/media'
}, origin);


If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.