- Set text_frame.word_wrap = True in add_text_element() for PPTX - Change CSS from white-space: pre-wrap to normal in HTML preview - Add overflow-wrap: break-word for better word breaking - Update README.md with auto-wrap documentation - Update element-rendering and html-rendering specs - Archive change: 2026-03-02-add-text-auto-wrap
23 lines
789 B
Markdown
23 lines
789 B
Markdown
# Implementation Tasks
|
||
|
||
## 1. PPTX 文本框自动换行实现
|
||
|
||
- [x] 1.1 修改 `add_text_element()` 函数,在创建文本框后设置 `text_frame.word_wrap = True`
|
||
- [x] 1.2 确保所有新创建的文本框默认启用自动换行
|
||
|
||
## 2. HTML 预览自动换行同步
|
||
|
||
- [x] 2.1 修改 `render_text_element_to_html()` 函数,调整 CSS `white-space` 样式
|
||
- [x] 2.2 将 `white-space: pre-wrap` 改为 `white-space: normal` 以启用自动换行
|
||
|
||
## 3. 测试验证
|
||
|
||
- [x] 3.1 创建测试 YAML 文件,包含长文本内容
|
||
- [x] 3.2 生成 PPTX 文件,验证文字在文本框内正确换行
|
||
- [x] 3.3 启动 HTML 预览,验证预览效果与 PPTX 一致
|
||
- [x] 3.4 清理测试文件
|
||
|
||
## 4. 文档更新
|
||
|
||
- [x] 4.1 更新 README.md,说明文本框默认启用自动换行
|