Skip to main content

Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。

Project description

Django-AiEditor

Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。AiEditor 是一个强大的 Web 富文本编辑器。

安装

pip install django-aieditor

快速开始

  1. 将 'django_aieditor' 添加到你的 INSTALLED_APPS 中:
INSTALLED_APPS = [
    ...
    'django_aieditor',
]
  1. 配置上传URL路由,在项目的urls.py中添加:
from django.urls import path, include

urlpatterns = [
    ...
    path('aieditor/', include('django_aieditor.urls')),
]
  1. 在你的模型中使用:
from django_aieditor.fields import AiEditorModelField

class MyModel(models.Model):
    content = AiEditorModelField("内容")
  1. 在你的表单中使用:
from django_aieditor.fields import AiEditorField

class MyForm(forms.Form):
    content = AiEditorField()

配置

在你的 settings.py 中可以添加以下配置:

AIEDITOR_CONFIG = {
    'toolbar': ['bold', 'italic', 'link', 'image'], # 工具栏
}

更多配置请访问:https://aieditor.dev/zh/

特性

  • 完整支持 AiEditor 的所有功能
  • 简单的 Django 集成
  • 支持文件上传(支持本地存储和云存储)
  • 支持自定义配置
  • Django Admin 集成

更新日志

v1.0.13 (2025-04-16)

  • 升级 AiEditor 到 1.3.6 版本
  • 新增高亮块功能支持
  • 新增文字计数器功能
  • 新增工具栏按钮大小调整功能
  • 优化粘贴配置,增强粘贴体验

文档

aiEditor 文档请访问:https://aieditor.dev/zh/

Django-AiEditor 文档请访问:https://github.com/mircool/django-aieditor

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_aieditor-1.0.13.tar.gz (848.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_aieditor-1.0.13-py2.py3-none-any.whl (853.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django_aieditor-1.0.13.tar.gz.

File metadata

  • Download URL: django_aieditor-1.0.13.tar.gz
  • Upload date:
  • Size: 848.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for django_aieditor-1.0.13.tar.gz
Algorithm Hash digest
SHA256 8a696dd56757bbd6cf7070bffd7ce14bbfc1c0cb5ad02fd9f0a1f4beadb7ce05
MD5 705172cedeebabce19fe4e2eb66bb992
BLAKE2b-256 5b3c2837d97fd91a4677d2ec966d8069f09b75c372f630e17470fda797f355f4

See more details on using hashes here.

File details

Details for the file django_aieditor-1.0.13-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_aieditor-1.0.13-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 91909ad8bd7c7daa31861278043f531febc165686bfbe45fefeee5b4cdc5ad6d
MD5 69311db909628c2572152f0a93d1b5c9
BLAKE2b-256 e15f01463fe138b4fdce2d22bdc5ed53a0e9d7a8af64d0d678b888dd60991dc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page