Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。
Project description
Django-AiEditor
Django-AiEditor 是一个为 Django 框架提供的 AiEditor 富文本编辑器集成包。AiEditor 是一个强大的 Web 富文本编辑器。
安装
pip install django-aieditor
快速开始
- 将 'django_aieditor' 添加到你的 INSTALLED_APPS 中:
INSTALLED_APPS = [
...
'django_aieditor',
]
- 配置上传URL路由,在项目的urls.py中添加:
from django.urls import path, include
urlpatterns = [
...
path('aieditor/', include('django_aieditor.urls')),
]
- 在你的模型中使用:
from django_aieditor.fields import AiEditorModelField
class MyModel(models.Model):
content = AiEditorModelField("内容")
- 在你的表单中使用:
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_aieditor-1.0.14.tar.gz.
File metadata
- Download URL: django_aieditor-1.0.14.tar.gz
- Upload date:
- Size: 848.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b59d9de4d1df89b0a76815b3ad4adbbda7e56e53288db702914cc738b24bb89
|
|
| MD5 |
2eff1905a81f65e9c1e50ec3a5bac970
|
|
| BLAKE2b-256 |
68896c0554e16a5d964be244a267dab43747588e241398826c9a6e43c59bc4ed
|
File details
Details for the file django_aieditor-1.0.14-py2.py3-none-any.whl.
File metadata
- Download URL: django_aieditor-1.0.14-py2.py3-none-any.whl
- Upload date:
- Size: 853.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
604e4e8c29a32981f87eb5ae32445676163ad4496b81de42ad3677b2f12bf66a
|
|
| MD5 |
edd54ffec6d03249676b3d2dc75afc53
|
|
| BLAKE2b-256 |
098b75bc90de5fbdbccb204da3443e40c51ddc2dbbaa2f638afc7ad34167adab
|