Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

How do I add embedded youtube video to a text field within active admin with simplemde markdown?

3
Rails

When I add the Youtube embed code. It displays it as a string on the front end.
The idea is that I could make this simple enough for the user updating the post to add the embed code easily themselves.

I solved this by adding "raw" in the view and I can now paste embed code into active admin

<%=@post.content%>

is now

<%= raw(@post.content)%>

By including "raw" in the view, I was able to resolve this and now I can paste embed code into active admin.

Thanks

Join the discussion
Create an account Log in