ipynb-editor
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

NPM

solarizedl and duotone forest themes monokai and xonokai themes
solarizedl with duotone_earth monokai with xonokai

This component draws an ipynb file in Jupyter Notebook. You can use MathJax to render math expressions; install ipynb-editor if you use MathJax.

If you are not particular, we recommend ipynb-editor.

Install

$ npm install --save ipynb-editor

Usage

Just pass an ipynb json object to IpynbEditor component.

Code example

Using ipynb-editor

import { IpynbEditor } from 'ipynb-editor';

// Jupyter theme
import 'ipynb-editor/dist/styles/monokai.css';
// import ipynb file as json
import ipynb from './test.ipynb';

export const Component = () => {
  return <IpynbEditor ipynb={ipynb} />;
};

How to use this on Next.js

import dynamic from 'next/dynamic';
const IpynbEditor = dynamic(
  () => import('ipynb-editor').then(mod => mod.IpynbEditor),
  {
    ssr: false,
  },
);
// import ipynb file as json
import ipynb from './test.ipynb';

export const Component = () => {
  return <IpynbEditor ipynb={ipynb} />;
};

Package Sidebar

Install

npm i ipynb-editor

Weekly Downloads

2

Version

1.1.0

License

Apache-2.0

Unpacked Size

4.96 MB

Total Files

31

Last publish

Collaborators

  • duongkimseng