Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

wolfram-notebook-embedder

WolframResearch149MIT0.3.0

Library to embed Wolfram Cloud notebooks on websites.

wolfram, cloud, notebook, embedding

readme

wolfram-notebook-embedder

A library to embed Wolfram Cloud notebooks on websites. It does not use an <iframe>, but renders a notebook directly into a given DOM node for a more seamless experience.

Installation

If you are using a package manager such as npm or Yarn, you can install this package from the npm repository:

npm install wolfram-notebook-embedder

and then import it in your JavaScript code like so:

import * as WolframNotebookEmbedder from 'wolfram-notebook-embedder';    

You can also import this library as a <script> tag from a CDN:

<script crossorigin src="https://unpkg.com/wolfram-notebook-embedder@0.3/dist/wolfram-notebook-embedder.min.js"></script>

and then use the global variable WolframNotebookEmbedder.

Usage & Documentation

Examples

Browser Support

We support all modern browsers (the last two major versions of Chrome, Firefox, Edge, Safari). Internet Explorer is not supported anymore.

Contributing

Everyone is welcome to contribute. Please read the Contributing agreement and the Development guide for more information, including how to run the tests.

Versioning

We use semantic versioning for this library and its API.

See the changelog for details about the changes in each release.

Each version of this library is compatible with a certain range of versions of the Wolfram Cloud. Currently, the requirement is Wolfram Cloud 1.50 or higher. We try hard not to make any backward-incompatible changes on the Wolfram Cloud side, which would require an update of this library to keep embeddings working.

Library version Minimum Wolfram Cloud version
0.1.x 1.50
0.2.x 1.55
0.3.x 1.59

License

This project is licensed under the MIT license.

changelog

0.3

  • Embedding of external notebooks at a given URL ({url: ...}) or with a given Notebook expression ({expr: ...})
  • New option showBorder to control whether to show a border around the embedded notebook
  • Officially dropped support for IE11
  • Add a default export, but encourage named imports

0.2.2

  • Pass through extra data from the initial server call to the cloud JS code, for better forward-compatibility

0.2.1

  • Fix issues with useShadowDOM when there are existing notebook-related style definitions on the page

0.2.0

  • New option useShadowDOM for better encapsulation of styling (still experimental and off by default)

0.1.5

  • First official release
  • Change the default for allowInteract from false to true
  • Improve documentation
  • Add website, built with Docusaurus

0.1.4

  • First proper release

0.1.0

  • Initial release