Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

Why youtube link selected in ckeditor5 is not visible on frontend?

ln laravel 8 / jquery 3.6 / ckeditor5 when in admin area I click on "Insert media" standart toolbar
button: Screenshot I copypaste youtube url
and ckeditor5 shows this video ok, but problem is that I can not render this video on frontend part.
In blade.php file I have lines :

HTML:
<div class="news-view-content">
            {!! $news->content !!}
            <hr>
            <hr>
            <hr>
            {{ $news->content }}
        </div>

Text of the content on frontend is:

HTML:
<figure class="media">
        <oembed url="https://www.youtube.com/watch?v=hufhhf2MSHU"></oembed>
    </figure>

But what I see in browser: Screenshot



I made some checks and found that when I need to show youtube video I can use html code like:
HTML:
     <iframe
        src="https://www.youtube.com/embed/key"
        title="_you_tubevideoplayer" frameborder="0"
        allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture;web-share" allowfullscreen>
    </iframe>

When I need to show uploaded video I need to use tag :
HTML:
    <video controls preload="auto"
        class="news-videovideo-jsnews_video_playervjs-theme-forest"
        data-setup='{}' type="video/x-msvideo">
        <source src="http://127.0.0.1:8000/storage/160/sample.avi">
    </video>
These 2 ways above works ok for my app.

But they are different "oembed" tag which is used in default ckeditor5 toolbar. Are there some options to change oembed tag with tags which works in my case ?

Maybe some different plugins?

What have I to change to make video available ?
 
Back
Top Bottom