forked from b2894lxlx/tuanwei-admin
feat(manuscript): 后台按正文格式标记渲染与保存
- 新增 utils/manuscript-content.ts:格式判定、bytemd 转 HTML、纯文本转段落 - 编辑弹窗打开时把 markdown / 纯文本转成富文本,否则 wangEditor 会把 # 和 ** 当成正文, 保存一次就把原稿改坏 - 保存统一写 contentFormat: 'html' - 列表加「正文格式」列,非 HTML 的行显式标出来
This commit is contained in:
@@ -9,8 +9,10 @@ export interface Manuscript {
|
||||
id?: number;
|
||||
//
|
||||
title?: string;
|
||||
//
|
||||
// 正文(HTML,历史上可能是 markdown / 纯文本)
|
||||
content?: string;
|
||||
// 正文格式:html / markdown / text
|
||||
contentFormat?: string;
|
||||
//
|
||||
cover?: string;
|
||||
// 是否删除, 0否, 1是
|
||||
|
||||
Reference in New Issue
Block a user