Skip to content

pandamodium/dash-quill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dash Quill

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.

Features

  • 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

Installation

pip install dash-quill

For R:

install.packages("dashQuill")

For Julia:

using Pkg
Pkg.add("DashQuill")

Basic Usage

Python

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)

R

library(dash)
library(dashQuill)

app <- Dash$new()

app$layout(
    htmlDiv(list(
        dre_quill(
            id='editor',
            value='Hello World!',
            placeholder='Start writing...'
        )
    ))
)

app$run_server()

Julia

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)

Component Properties

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

Development

Setting Up Development Environment

  1. 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
  1. Run the demo app:
npm run build
python usage.py

Visit http://localhost:8050 in your web browser to see the demo.

Component Development

The main component code is in src/lib/components/Quill.react.js. The demo app is in src/demo/.

To test your changes:

  1. Build the component: npm run build
  2. Run the demo: python usage.py
  3. Run tests: pytest tests/

Building for Production

  1. Create distribution files:
npm run build
python setup.py sdist bdist_wheel
  1. Test the package:
pip install dist/dash_quill-*.tar.gz
  1. Publish (if you have access):
# Upload to PyPI
twine upload dist/*

# Publish to NPM (optional)
npm publish

Contributing

See CONTRIBUTING.md for guidelines on contributing to this project.

Community

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Dash Rich Text Editor Component (based on Quill)

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors