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 集成

文档

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.12.tar.gz (838.9 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.12-py2.py3-none-any.whl (845.4 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: django_aieditor-1.0.12.tar.gz
  • Upload date:
  • Size: 838.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for django_aieditor-1.0.12.tar.gz
Algorithm Hash digest
SHA256 2a41795699744543769b78aec67837c29b8fb04a27aead713a6443006a80e06f
MD5 0baaa5eec5648d09630a56fbed3a06d3
BLAKE2b-256 35394a00ea2bd816327492eabca64d3fc5d3be053e2095798175aa22251cb3f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_aieditor-1.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 12a0057acc8b72cb814f336a6098282791ca4f87fb9c7b8719a9b039091ce06b
MD5 2bcb52958b00df41377eab3dc0eedbcc
BLAKE2b-256 781d2b6098d3b62b83652a82ded0152317dacd55dcd6f42cc5f2dcb94043e63d

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