embeeding videos into blade templates.

Posted 8 months ago by marcosdipaolo

I'm having some strange (or at the very least unexpected) behavior trying to embeed vimeo and youtube videos in blog posts. I'm using the quill wysiwyg editor, and all that works fine. But once i save a post including an embeeded video within an iframe in it's body..., something like that:

<p>This is a post with an embeeded video.</p>
<iframe class="ql-video" frameborder="0" allowfullscreen="true" src="https://www.youtube.com/embed/w02pBKY-PLM?showinfo=0"></iframe>

The page has a pre-loader and it keeps loading forever, waiting to finish loading the page, which never happens. The snippet above is what is saved to the DB as a string. I'm trying to render it like this:{!! $post->body !!} I tried also with {{ }} and many other things, and nothing.

Edit: sorry, i think i called {!! str_limit($post->body, 40) !!} somewhere and the function cutted the iframe at the half being impossible to render, i think that's the problem.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.