-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spell out "JavaScript" (instead of "JS") on all documentation pages
- Loading branch information
Showing
6 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ title: Getting Started | |
npm install wolfram-notebook-embedder | ||
``` | ||
so you can import it in JS as | ||
so you can import it in JavaScript as | ||
```js | ||
import WolframNotebookEmbedder from 'wolfram-notebook-embedder'; | ||
|
@@ -28,14 +28,14 @@ title: Getting Started | |
```html | ||
<script crossorigin src="https://unpkg.com/[email protected]/dist/wolfram-notebook-embedder.min.js"></script> | ||
``` | ||
3. In your HTML, create a container where you want the notebook to be rendered (say `<div id="notebookContainer"></div>`) and add the following JS code: | ||
3. In your HTML, create a container where you want the notebook to be rendered (say `<div id="notebookContainer"></div>`) and add the following JavaScript code: | ||
```js | ||
var embedding = WolframNotebookEmbedder.embed('url', document.getElementById('notebookContainer')); | ||
``` | ||
where `url` is the URL of your cloud object from step 1. More details about `embed` are described in the [library interface documentation](./LibraryInterface.md). | ||
4. If you want to control the notebook from your JS code, wait for the `embed` result (a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)) to resolve, and then use various [Notebook API methods](./NotebookAPI.md): | ||
4. If you want to control the notebook from your JavaScript code, wait for the `embed` result (a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)) to resolve, and then use various [Notebook API methods](./NotebookAPI.md): | ||
```js | ||
embedding.then(function (nb) { | ||
|
@@ -50,5 +50,5 @@ title: Getting Started | |
}); | ||
}) | ||
``` | ||
5. If you want to serve static HTML from your server so the notebook can be rendered before JS code is loaded (which also helps with SEO), take a look at [server-side rendering](./ServerSideRendering.md). | ||
5. If you want to serve static HTML from your server so the notebook can be rendered before JavaScript code is loaded (which also helps with SEO), take a look at [server-side rendering](./ServerSideRendering.md). | ||
6. If you run into any issues, take a look at the [troubleshooting guide](./Troubleshooting.md). If you think you found a bug, please report it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters