Ckeditor5: Alternatives to: Iframely or Embedly (grdp)

Created on 19 Feb 2019  路  3Comments  路  Source: ckeditor/ckeditor5

Is there a free client/server side alternative (php, js, what ever) out there? I just need it for videos.
It should be grdp conform.

media-embed question

All 3 comments

for a field named bio, i was able to get the editor to save the output of a preview in the data output.

<script>
        ClassicEditor
        .create( document.querySelector( '#bio' ), {
            mediaEmbed: { previewsInData: true } 
        } )
        .then( editor => {
            console.log( editor );
        } )
        .catch( error => {
            console.error( error );
        } );
    </script>

the output looks like <figure class="media"><div data-oembed-url="https://www.youtube.com/watch?v=5zqT6ZYwMFM"><div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/5zqT6ZYwMFM" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0"></iframe></div></div></figure>

however, what it needs to look like in order to render successfully:

<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/5zqT6ZYwMFM" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0"></iframe></div>

so it seems that we need to remove the outer 2 tags <figure class="media"><div data-oembed-url="https://www.youtube.com/watch?v=5zqT6ZYwMFM"> and </div></figure> from the output. then we wouldn't need embedly or iframely for generic video sites like youtube that ck5 provides a preview for.

Iframely actually offers a self-hosted (open sourced) version of their service:
https://iframely.com/docs/host

Iframely actually offers a self-hosted (open sourced) version of their service:
https://iframely.com/docs/host

I've managed to self-host iframely, and it works as intended but I'm not sure what to do with it in the front-end of my website. Do i need to exec "//cdn.iframe.ly/embed.js", or do i need to self-host embed.js as well?

How do I connect my self-hosted iframely with my front-end cms, so it automatically displays the media as intended instead of ?

Was this page helpful?
0 / 5 - 0 ratings