like create a post with a youtube url
and the url image shows in post and link to the video
Youtube themselves will give you the embed code to do that. I think you can generally find it right below the video. It’s typically html + javascript.
wrap the content in raw()
<%= raw(@youtube_code) %>
But make sure you’re generating youtube_code yourself and not pulling it remotely.
how to pull remotely
Don’t pull remotely. Make sure you yourself are generating the html that you will be outputting.
thanks but whats the reason not to pull remotely is it illegal
It can lead to a situation where hostile third parties can inject harmful code onto your site.
thanks do you have some tutorials i can follow im a beginner and i like programming
thanks
is it the same for article links too