Show and Tell - Dash Code Editor

Hi everyone,

We’d like to share with you dash-editor-components, a simple TextArea-based object that is a Python code editor with syntax highlighting!

The package relies on react simple code editor and prismJS.

The source code is hosted on Github. You can install it with pip install dash-editor-components. Bug reports and pull requests are very welcomed.


Question: if I wanted to turn this into, say, a JavaScript editor, would I just need to change a few lines of the source code then build it again?

Another cool one! Nice!

Just a minor issue: installing with pip seems to not download the css file. I got greeted with this error: FileNotFoundError: [Errno 2] No such file or directory: 'PYTHON_ENV_PATH/lib/python3.6/site-packages/dash_editor_components/editor.css'

Hi mr_tambourine_man, you will need to change lines 6 and 36 in PythonEditor.react.js as well as prismjs plugin options in .babelrc :slight_smile:

Ok, I have just forgot to include editor.css in MANIFEST file. New version 0.0.2 has fixed that.

1 Like

Another question, if I wanted to turn this into a general purpose editor for every language that prism supports, would this mean sending a huge bundle to the browser?

Very nice component. Is there any plan to add features like a simple auto-completion?