ipywidgets_server icon indicating copy to clipboard operation
ipywidgets_server copied to clipboard

Embed ipywidgets server in a web-page

Open pbugnion opened this issue 7 years ago • 2 comments

How can you embed ipywidgets-server output in a webpage?

Originally raised as part of issue #39 .

pbugnion avatar Jun 06 '18 05:06 pbugnion

  1. You can serve custom HTML from ipywidgets-server. See this issue. This is useful if your web-page is mostly a dashboard and you want to customise a few things around that.

  2. If your webpage is mostly HTML, you can serve ipywidgets-server normally, and use an iframe in your webpage to display ipywidgets-server contents. If ipywidgets-server is serving on http://some-host.com, then add a tag like <iframe src="http://some-host.com" width="600" height="400"></iframe>. For more documentation on iframes: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe.

pbugnion avatar Jun 06 '18 05:06 pbugnion

Whatever option you choose, I'd love to hear how you get on.

pbugnion avatar Jun 06 '18 05:06 pbugnion