embedding videos from youtube

is it possible yet? i've looked at the plug in section but doesn't contain anything neither does the tricks section. im looking to embed youtube videos and have them display on the page. so far the only method that i know of is to use this syntax below, but it doesn't have the play button and goes to youtube i want to view the video on the page.
[![Blinking LEDs](http://img.youtube.com/vi/XAMVzS13HY0/0.jpg)](http://www.youtube.com/watch?v=XAMVzS13HY0 "Blinking LEDs")
[![Blinking LEDs](http://img.youtube.com/vi/XAMVzS13HY0/0.jpg)](http://www.youtube.com/watch?v=XAMVzS13HY0 "Blinking LEDs")
thanks.
6 Replies
Vp
Vp2y ago
In custom or resource page? If it's custom then you can copy-paste the embedded link in blade file
warpig
warpigOP2y ago
the resource page
warpig
warpigOP2y ago
GitHub
GitHub - spatie/filament-markdown-editor: A markdown editor for Fil...
A markdown editor for Filament with code highlighting and image uploads - GitHub - spatie/filament-markdown-editor: A markdown editor for Filament with code highlighting and image uploads
warpig
warpigOP2y ago
it accepts inline html but the iframe introduces html, is there a way around to only embedding the video? this is what i input into the body of my post
body of the post

<iframe
width="640"
height="480"
src="https://www.youtube.com/embed/ApzPnujS7WY"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen
>
</iframe>
body of the post

<iframe
width="640"
height="480"
src="https://www.youtube.com/embed/ApzPnujS7WY"
frameborder="0"
allow="autoplay; encrypted-media"
allowfullscreen
>
</iframe>
it messes the layout on my post.view thanks
Kenneth Sese
Kenneth Sese2y ago
Try creating a custom view field: https://filamentphp.com/docs/2.x/forms/fields#view
Filament
Fields - Form Builder - Filament
The elegant TALL stack form builder for Laravel artisans.
warpig
warpigOP2y ago
it worked, i forgot i had this:
{{ Str::markdown($post->body) }}
{{ Str::markdown($post->body) }}
switched back to
{!! $post->body !!}
{!! $post->body !!}
now the markdown doesn't work i'll see about the custom view field thanks @kennethsese solved it: i installed this package
composer require spatie/laravel-markdown
composer require spatie/laravel-markdown
and just using the <x-markdown> component lets me display the markdown
<div class="my-8 text-lg">
<x-markdown>
{!! $post->body !!}
</x-markdown>
</div>
<div class="my-8 text-lg">
<x-markdown>
{!! $post->body !!}
</x-markdown>
</div>
Want results from more Discord servers?
Add your server