semvec/pypi-packages huggingface dataset:
django-textedit 0.1.0
A reusable Django rich text editor widget with image upload and XSS protection.
License: MIT
Requires Python: >=3.10

# django-textedit

A reusable Django rich text editor widget with image upload, emoji picker, and XSS protection. No external dependencies.

## Features

- **WYSIWYG Editor** : contenteditable-based, no external JS library
- **Toolbar** : bold, italic, underline, highlight, text color, uppercase, bullet lists (5 types), alignment, image insert, emoji insert
- **Image Upload** : drag & drop or file browser, with multi-layer server validation (extension, MIME, magic bytes, file size, filename sanitization)
- **Emoji Picker** : 7 categories (smileys, gestures, symbols, nature, food, travel, sport), 200+ emojis
- **Image Resize** : proportional resize handles on all 4 corners (mouse & touch)
- **HTML Sanitizer** : whitelist-based anti-XSS, automatic on save
- **Responsive** : mobile-first CSS with 3 breakpoints (mobile, tablet 768px+, desktop 1024px+)
- **Django Admin** : dedicated `AdminTextEditWidget` with admin-specific CSS
- **CSRF Protected** : image uploads use the CSRF token from cookie

## Quick Start

```bash
pip install django-textedit
```

Add to `INSTALLED_APPS`:

```python
INSTALLED_APPS = [
    # ...
    'textedit',
]
```

Configure media files in `settings.py`:

```python
MEDIA_URL = '/media/'
MEDIA_ROOT = BASE_DIR / 'media'
```

Include URLs in your `urls.py`:

```python
from django.urls import include, path

urlpatterns = [
    path('textedit/', include('textedit.urls')),
]
```

## Usage

### Model

```python
from django.db import models
from textedit.models import RichTextField

class Article(models.Model):
    title = models.CharField(max_length=200)
    content = RichTextField()
```

### Form

```python
from django import forms
from textedit.forms import TextEditFormField
from .models import Article

class ArticleForm(forms.ModelForm):
    content = TextEditFormField()

    class Meta:
        model = Article
        fields = ['title', 'content']
```

### Template

```html
<head>
    {{ form.media }}
</head>
<body>
    <form method="post">
        {% csrf_token %}
        {{ form.content }}
        <button type="submit">Save</button>
    </form>
</body>
```

## Configuration

Optional settings in `settings.py`:

```python
# Max upload size in bytes (default: 5 MB)
TEXTEDIT_MAX_UPLOAD_SIZE = 5 * 1024 * 1024

# Allowed image extensions
TEXTEDIT_ALLOWED_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.gif', '.webp']

# Upload directory (relative to MEDIA_ROOT)
TEXTEDIT_UPLOAD_DIR = 'textedit_uploads'
```

## Requirements

- Python >= 3.10
- Django >= 4.2

## License

MIT
cgatcore 0.6.20
cgatcore: the Computational Genomics Analysis Toolkit
License: MIT
Keywords: computational genomics

# CGAT-core

[![codecov](https://codecov.io/gh/cgat-developers/cgat-core/branch/main/graph/badge.svg)](https://codecov.io/gh/cgat-developers/cgat-core)

![CGAT-core](https://github.com/cgat-developers/cgat-core/blob/master/docs/img/CGAT_logo.png)
----------------------------------------
![Licence](https://img.shields.io/github/license/cgat-developers/cgat-core.svg)
![Conda](https://img.shields.io/conda/v/bioconda/cgatcore.svg)
![Build Status](https://github.com/cgat-developers/cgat-core/actions/workflows/cgatcore_python.yml/badge.svg)


----------------------------------------

CGAT-core is a workflow management system that allows users to quickly and reproducibly build scalable
data analysis pipelines. CGAT-core is a set of libraries and helper functions used to enable researchers
to design and build computational workflows for the analysis of large-scale data-analysis. 

Documentation for CGAT-core can be accessed [here](https://cgat-developers.github.io/cgat-core/) 

CGAT-core is open-sourced, powerful and user-friendly, and has been continually developed 
as a Next Generation Sequencing (NGS) workflow management system over the past 10 years.


Installation
============

The following sections describe how to install the [cgatcore](https://cgat-developers.github.io/cgat-core/) framework. 

The preferred method to install the cgatcore is using conda, by following the instructions on [read the docs](https://cgat-core.readthedocs.io/en/latest/getting_started/Installation.html). However, there are a few other methods to install cgatcore, including pip and our own bash script installer.