Skip to main content

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 = {
    'toolbarKeys': ['bold', 'italic', 'link', 'image'], # 工具栏
}

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

特性

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

更新日志

v1.0.14 (2025-04-16)

  • 修复在settings.py中配置不生效的问题
  • 更新文档,添加正确的配置示例

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

Metadata

Release files for django-aieditor 1.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-aieditor 1.0.14
File Size Uploaded
django_aieditor-1.0.14.tar.gz 848.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-aieditor 1.0.14
File Interpreter ABI Platform
django_aieditor-1.0.14-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 1.7 MB

Release files / django_aieditor-1.0.14.tar.gz

Download URL django_aieditor-1.0.14.tar.gz
Size 848.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7b59d9de4d1df89b0a76815b3ad4adbbda7e56e53288db702914cc738b24bb89
BLAKE2b-256 checksum
How to use checksums
68896c0554e16a5d964be244a267dab43747588e241398826c9a6e43c59bc4ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release files / django_aieditor-1.0.14-py2.py3-none-any.whl

Download URL django_aieditor-1.0.14-py2.py3-none-any.whl
Size 853.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
604e4e8c29a32981f87eb5ae32445676163ad4496b81de42ad3677b2f12bf66a
BLAKE2b-256 checksum
How to use checksums
098b75bc90de5fbdbccb204da3443e40c51ddc2dbbaa2f638afc7ad34167adab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.16

Release history Release notifications | RSS feed

This release

1.0.14 This release

2 release files

1.0.13

2 release files

1.0.12

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page