How to post hyperlinks in form like

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.

my post only show the link not the image with image to link its not working

wrap the content in raw()

<%= raw(@youtube_code) %>

But make sure you’re generating youtube_code yourself and not pulling it remotely.

1 Like

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

Check out by @AlchemistCamp



1 Like

is it the same for article links too