Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I build an 'embeddable widget'?

My webapp uses both Rails and JS and I would like users to be able to embed the images they upload to any blog/site.

What do I need to know, from a development point-of-view to allow me to create the functionality that generates an 'embed' link. It can be either a link like YouTube does, or a JS snippet or anything.

Just want to get a high-level overview of what I need to be able to do and how to proceed.

Thanks.

like image 794
marcamillion Avatar asked Jun 20 '11 23:06

marcamillion


People also ask

How do I create an embeddable widget?

To set a widget as embeddable, go into the widget settings and check the "Make Embeddable" box. All visitors of you site will be able to see the <embed> link when hovering over the widget. Clicking the <embed> link with generate the iFrame code to embed the widget into a site. Copy the iFrame code.

What are embeddable widgets?

An embeddable widget is any widget that could be embedded right inside your webpage in a way that it looks like an integral part of the website.


1 Answers

I would try using iframe. I created a widget which used javascript and I put it all into a single html file hosted on my website. Then I gave away an iframe snippet like this for example...

<iframe src="http://mywesbite.com/myWidget.html"></iframe>

The user can simply place the iframe snippet into their website and that's it!

like image 138
Jacob Avatar answered Oct 03 '22 18:10

Jacob