Add export to Word functionality with Markdown support
- Implemented a new plugin to export current conversation content from Markdown to Word (.docx) format.
- Added README_CN.md for Chinese documentation, detailing features, supported Markdown syntax, usage instructions, font configurations, and author information.
- Developed export_to_word.py to handle the conversion process, including title extraction, document creation, and file download triggering.
- Included support for various Markdown elements such as headings, lists, tables, and inline formatting.
- Ensured proper handling of Chinese and English text without encoding issues.
2025-12-30 13:29:44 +08:00
|
|
|
# Export to Word
|
|
|
|
|
|
2025-12-30 14:45:51 +08:00
|
|
|
Export current conversation from Markdown to Word (.docx) with proper Chinese and English encoding and smarter filenames.
|
Add export to Word functionality with Markdown support
- Implemented a new plugin to export current conversation content from Markdown to Word (.docx) format.
- Added README_CN.md for Chinese documentation, detailing features, supported Markdown syntax, usage instructions, font configurations, and author information.
- Developed export_to_word.py to handle the conversion process, including title extraction, document creation, and file download triggering.
- Included support for various Markdown elements such as headings, lists, tables, and inline formatting.
- Ensured proper handling of Chinese and English text without encoding issues.
2025-12-30 13:29:44 +08:00
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
- **One-Click Export**: Adds an "Export to Word" action button to the chat.
|
|
|
|
|
- **Markdown Conversion**: Converts Markdown syntax to Word formatting (headings, bold, italic, code, tables, lists).
|
|
|
|
|
- **Multi-language Support**: Properly handles both Chinese and English text without garbled characters.
|
2025-12-30 14:45:51 +08:00
|
|
|
- **Smarter Filenames**: Prefers chat title (from body or chat_id lookup) → first Markdown h1/h2 → user + date.
|
Add export to Word functionality with Markdown support
- Implemented a new plugin to export current conversation content from Markdown to Word (.docx) format.
- Added README_CN.md for Chinese documentation, detailing features, supported Markdown syntax, usage instructions, font configurations, and author information.
- Developed export_to_word.py to handle the conversion process, including title extraction, document creation, and file download triggering.
- Included support for various Markdown elements such as headings, lists, tables, and inline formatting.
- Ensured proper handling of Chinese and English text without encoding issues.
2025-12-30 13:29:44 +08:00
|
|
|
|
|
|
|
|
## Supported Markdown Syntax
|
|
|
|
|
|
|
|
|
|
| Syntax | Word Result |
|
|
|
|
|
| :---------------------------------- | :----------------------------- |
|
|
|
|
|
| `# Heading 1` to `###### Heading 6` | Heading levels 1-6 |
|
|
|
|
|
| `**bold**` or `__bold__` | Bold text |
|
|
|
|
|
| `*italic*` or `_italic_` | Italic text |
|
|
|
|
|
| `***bold italic***` | Bold + Italic |
|
|
|
|
|
| `` `inline code` `` | Monospace with gray background |
|
|
|
|
|
| ` ``` code block ``` ` | Code block with indentation |
|
|
|
|
|
| `[link](url)` | Blue underlined link text |
|
|
|
|
|
| `~~strikethrough~~` | Strikethrough text |
|
|
|
|
|
| `- item` or `* item` | Bullet list |
|
|
|
|
|
| `1. item` | Numbered list |
|
|
|
|
|
| Markdown tables | Table with grid |
|
|
|
|
|
| `---` or `***` | Horizontal rule |
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
1. Install the plugin.
|
|
|
|
|
2. In any chat, click the "Export to Word" button.
|
|
|
|
|
3. The .docx file will be automatically downloaded to your device.
|
|
|
|
|
|
2025-12-30 14:45:51 +08:00
|
|
|
|
|
|
|
|
### Notes
|
|
|
|
|
|
|
|
|
|
- Title detection only considers h1/h2 headings.
|
|
|
|
|
- If the request carries `chat_id` (body or metadata), the plugin will fetch the chat title from the database when the body lacks one.
|
|
|
|
|
- Default fonts: Times New Roman (en), SimSun/SimHei (zh), Consolas (code).
|
|
|
|
|
|
|
|
|
|
### Requirements
|
|
|
|
|
|
|
|
|
|
- python-docx==1.1.2 (already declared in the plugin docstring; ensure installed in your environment).
|
|
|
|
|
|
Add export to Word functionality with Markdown support
- Implemented a new plugin to export current conversation content from Markdown to Word (.docx) format.
- Added README_CN.md for Chinese documentation, detailing features, supported Markdown syntax, usage instructions, font configurations, and author information.
- Developed export_to_word.py to handle the conversion process, including title extraction, document creation, and file download triggering.
- Included support for various Markdown elements such as headings, lists, tables, and inline formatting.
- Ensured proper handling of Chinese and English text without encoding issues.
2025-12-30 13:29:44 +08:00
|
|
|
## Font Configuration
|
|
|
|
|
|
|
|
|
|
- **English Text**: Times New Roman
|
|
|
|
|
- **Chinese Text**: SimSun (宋体) for body, SimHei (黑体) for headings
|
|
|
|
|
- **Code**: Consolas
|
|
|
|
|
|
|
|
|
|
## Author
|
|
|
|
|
|
|
|
|
|
Fu-Jie
|
|
|
|
|
GitHub: [Fu-Jie/awesome-openwebui](https://github.com/Fu-Jie/awesome-openwebui)
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
MIT License
|