1.4.0 • Published 2 years ago

react-python-editor v1.4.0

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
2 years ago

Moocfi Python Editor

NPM version

React Python Editor is a React component that provides an in-browser editing and running environment for Python code. The editor is based on Pyodide python runtime environment that is run using webworkers.

Usage

Install with npm i react-python-editor.

The editor component can be used in a following way:

import { PythonEditor } from "react-python-editor"

const App = () => {
  // ...

  return <ProgrammingExercise editorHeight="400px" outputHeight="200px" />
}

Optional properties:

  • debug Show and log debug information if set to true.
  • editorHeight Height of the editor. Defaults to 400px.
  • outputHeight Maximum height of the output content in pixels.

Setting up the project

  1. Clone the project on GitHub
  2. Go to the project root directory and run npm ci & npm run encode:worker
  3. Go to the example directory and run npm ci

Running the project

To run the project in example environment, go to the example directory and run npm start.

If you make any changes to the worker, you will always need to run the encode:worker command again.

License

This project is forked from https://github.com/rage/python-editor

This project is licensed under either of

at your option.

1.4.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago