Files
nexus/wiki/entities/TinyMCE.md
2026-04-14 16:02:50 +08:00

32 lines
776 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "TinyMCE"
type: entity
tags: [rich-text-editor, javascript, django]
sources: [tiktok-pm-python-django-project.md]
last_updated: 2026-04-14
---
## Definition
TinyMCE是一个基于JavaScript的富文本编辑器可集成到Web应用中提供类似Word的编辑体验。
## Role in TikTok PM Project
- 集成到Django Admin中
- 用于编辑product的description、description_1、description_2字段
- 提供富文本格式(粗体、斜体、列表等)
## Installation
```bash
pip install django-tinymce
```
## Usage
在Django Admin的ProductAdminForm中指定字段使用TinyMCE widget
```python
widgets = {
'description': TinyMCE(attrs={'cols': 80, 'rows': 20}),
}
```
## Connections
- [[TinyMCE]] ← integrated_into ← [[Django Admin定制]]