A rich text editor component for Dash applications, powered by Quill.js. This component enables rich text editing capabilities in your Dash apps with a modern, user-friendly interface.
- Rich text editing with formatting tools (bold, italic, lists, etc.)
- Real-time content updates
- Customizable toolbar options
- Cross-language support (Python, R, Julia)
- Seamless integration with Dash callbacks
- Lightweight and performant
pip install dash-quillFor R:
install.packages("dashQuill")For Julia:
using Pkg
Pkg.add("DashQuill")from dash import Dash, html
import dash_quill
app = Dash(__name__)
app.layout = html.Div([
dash_quill.Quill(
id='editor',
value='Hello World!',
placeholder='Start writing...'
)
])
if __name__ == '__main__':
app.run_server(debug=True)library(dash)
library(dashQuill)
app <- Dash$new()
app$layout(
htmlDiv(list(
dre_quill(
id='editor',
value='Hello World!',
placeholder='Start writing...'
)
))
)
app$run_server()using Dash
using DashQuill
app = dash()
app.layout = html_div() do
dre_quill(
id="editor",
value="Hello World!",
placeholder="Start writing..."
)
end
run_server(app)| Property | Type | Description | Default |
|---|---|---|---|
| id | string | The ID used to identify this component | required |
| value | string | The editor content as HTML string | "" |
| placeholder | string | Placeholder text when editor is empty | "Compose an epic..." |
| readonly | boolean | Whether to make the editor read-only | false |
| theme | string | Editor theme ("snow" or "bubble") | "snow" |
| modules | dict | Quill modules configuration | default toolbar |
- Clone the repository and install dependencies:
# Install npm packages
npm install
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# Install Python dependencies
pip install -r requirements.txt
# Install test dependencies (optional)
pip install -r tests/requirements.txt- Run the demo app:
npm run build
python usage.pyVisit http://localhost:8050 in your web browser to see the demo.
The main component code is in src/lib/components/Quill.react.js. The demo app is in src/demo/.
To test your changes:
- Build the component:
npm run build - Run the demo:
python usage.py - Run tests:
pytest tests/
- Create distribution files:
npm run build
python setup.py sdist bdist_wheel- Test the package:
pip install dist/dash_quill-*.tar.gz- Publish (if you have access):
# Upload to PyPI
twine upload dist/*
# Publish to NPM (optional)
npm publishSee CONTRIBUTING.md for guidelines on contributing to this project.
- Report bugs or request features on GitHub Issues
- Get help on the Dash Community Forum
- Find more Dash components at GitHub Topics: plotly-dash
This project is licensed under the MIT License - see the LICENSE file for details.