lucified/lucify-embed-utils

Name: lucify-embed-utils

Owner: Lucify

Description: null

Created: 2016-04-07 18:57:06.0

Updated: 2016-04-07 18:57:42.0

Pushed: 2016-04-08 11:41:18.0

Homepage: null

Size: 10

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Utilities for embedding (with) React components

About

This is a pre-release of a package belonging to the Lucify platform. It has been published merely to satisfy dependencies of other packages. Any APIs may change without notice.

This package contains some utilities for:

IFrame resizing is based on the iframe-resizer project by David Bradshaw.

IFrameEmbed
rt { IFrameEmbed } from 'lucify-embed-utils'
se IFrameEmbed as regular React Component

React component for embedding a web page in an iframe. The web page to be embedded should include the iframeResizer.contentWindow.min.js for resizing to work.

The only React prop is url, which is the URL for the page to be embedded. The component will initialize iframe-resizer to support automatic resizing of the page.

Notes

The original iframe-resizer implementation unfortunately does not work properly when the module is loaded twice. This can happen if iframe-resizer is a dependency for multiple submodules of a project. The forked resize implementation in this project makes sure it is loaded only once.

TODO

Add code for generating embed codes.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.