Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6108929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:20:54+00:00 2026-05-23T14:20:54+00:00

So I am storing the whole embed code from youtube into my database and

  • 0

So I am storing the whole embed code from youtube into my database and then outputting it like this.

<%= raw(people.video) %>

which outputs the general iframe tag copied from youtube:

<iframe src="foo" width=400 height=380></iframe>

the problem is that it actually displays that tag instead of embedding the video into the page itself. I can get around this just by storing the src in the database…. but this is part of a mini cms system and the site admins would find it much easier just to copy and past the embed code from youtube. Is there someway I can specify for the iframe to actually render instead of just spitting out the html on the page?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T14:20:55+00:00Added an answer on May 23, 2026 at 2:20 pm

    You can use the raw method to render the HTML of a string, are you storing it that way? You can also try the RedCloth gem – I was able to get this working like so:

    <%= raw RedCloth.new(@page_content.content).to_html %>
    

    Which allowed for my custom CMS to use the Textile markup
    http://en.wikipedia.org/wiki/Textile_%28markup_language%29

    I’m not 100% on what you’re seeing, since raw should render HTML, but you might also try to include the embed tag using a JavaScript.write, since there are some issues related to Flash objects embedded in HTML vs JavaScript.

    Let me know if this doesn’t work, and if so, can you provide screenshots or copy what you’re seeing on the page?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an embeddeble code of a slide like below. this whole html is
I have this code where I am trying to read an image from Url:
I would like to embed an image into my JasperReports jrxml file. I have
I'd like to read whole content of a text file to a std::string object
I'm trying to embed a PDF file into a Word document using the OLE
I have this piece of HTML: <div class=embed> <iframe width=300 height=200 frameborder=0 allowfullscreen= src=http://www.youtube.com/embed/123456></iframe>
This is a C# question. I was just wandering if anyone tried storing their
I've asked a question like this before but this one is different, this is
I have a fairly large repetitive XML to create using JAXB. Storing the whole
I an using Session for storing UserName for whole project. But it always time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.