feat(manuscript): 后台按正文格式标记渲染与保存

- 新增 utils/manuscript-content.ts:格式判定、bytemd 转 HTML、纯文本转段落
- 编辑弹窗打开时把 markdown / 纯文本转成富文本,否则 wangEditor 会把 # 和 ** 当成正文,
  保存一次就把原稿改坏
- 保存统一写 contentFormat: 'html'
- 列表加「正文格式」列,非 HTML 的行显式标出来
This commit is contained in:
2026-10-22 14:37:47 +08:00
parent baf6fe2ca8
commit e210a9b4b7
4 changed files with 157 additions and 9 deletions
+3 -1
View File
@@ -9,8 +9,10 @@ export interface Manuscript {
id?: number;
//
title?: string;
//
// 正文(HTML,历史上可能是 markdown / 纯文本)
content?: string;
// 正文格式:html / markdown / text
contentFormat?: string;
//
cover?: string;
// 是否删除, 0否, 1是