Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternatives to: Iframely or Embedly (grdp) #2776

Closed
skerbis opened this issue Feb 19, 2019 · 6 comments
Closed

Alternatives to: Iframely or Embedly (grdp) #2776

skerbis opened this issue Feb 19, 2019 · 6 comments
Labels
package:media-embed resolution:expired This issue was closed due to lack of feedback. status:stale type:question This issue asks a question (how to...).

Comments

@skerbis
Copy link

skerbis commented Feb 19, 2019

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.

@skerbis skerbis changed the title Alternatives to Iframely or Embedly (grdp) Alternatives to: Iframely or Embedly (grdp) Feb 19, 2019
@azeemh
Copy link

azeemh commented May 11, 2019

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.

@Yahav
Copy link

Yahav commented Sep 21, 2019

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

@mlewand mlewand transferred this issue from ckeditor/ckeditor5-media-embed Oct 9, 2019
@mlewand mlewand added package:media-embed type:question This issue asks a question (how to...). labels Oct 9, 2019
@mlewand mlewand added this to the unknown milestone Oct 9, 2019
@pecagg
Copy link

pecagg commented May 20, 2020

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 ?

@tony
Copy link
Contributor

tony commented Jun 2, 2021

Related: #2737

I've created basic <o-embed> fill that had rich embeds and an iframe fallback. This avoids the overhead of having an extra service.

https://social-embed.git-pull.com, codepen, jsfiddle

npm install @social-embed/wc

// Load support for `<o-embed>`
import '@social-embed/wc';'`

You can also do this <script src="https://www.unpkg.com/@social-embed/wc?module" type="module"></script>

In your MediaEmbed config:

{
  mediaEmbed: {
    elementName: 'o-embed'
  }
}

You can also do:

npm install @social-embed/lib

import { genericUrlRegex } from '@social-embed/lib'

const yourCKEditorConfig = {
  // ...
  mediaEmbed: {
    elementName: 'o-embed',
    extraProviders: [
      {
        name: 'genericProvider',
        url: genericUrlRegex,
        html: (match) => {
          return `<o-embed url="${match[0]}"></o-embed>`
        },
      },
    ],
  },
}

But you must import '@social-embed/wc';' or embed via <script src="https://www.unpkg.com/@social-embed/wc?module" type="module"></script> so<o-embed> is available on the editor too.

@pomek pomek removed this from the unknown milestone Feb 21, 2022
@CKEditorBot
Copy link
Collaborator

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

@CKEditorBot
Copy link
Collaborator

We've closed your issue due to inactivity over the last year. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

@CKEditorBot CKEditorBot added the resolution:expired This issue was closed due to lack of feedback. label Nov 4, 2023
@CKEditorBot CKEditorBot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:media-embed resolution:expired This issue was closed due to lack of feedback. status:stale type:question This issue asks a question (how to...).
Projects
None yet
Development

No branches or pull requests

8 participants