refactor: ByteMD 迁移至 Tiptap WYSIWYG 编辑器 + Token 刷新优化
- 移除 ByteMD CDN 资源和 goldmark 依赖,替换为 Tiptap ESM 模块 - 编辑器从源码编辑模式改为 WYSIWYG 所见即所得 - 移除 /api/posts/preview 预览接口(Tiptap 直接输出 HTML 无需后端渲染) - 保留 UploadImage 图片上传接口和 bluemonday HTML 消毒 - 工具栏支持加粗、斜体、删除线、代码、标题、列表、引用、代码块、分割线、撤销/重做 - 支持图片粘贴/拖拽上传,Ctrl+S 快捷提交,F11 全屏,字数统计 - 优化 common.js:自动 401 拦截 Token 刷新,修复刷新死循环 - 草稿 localStorage 键名更新为 draft_post_body_html
This commit is contained in:
@ -247,9 +247,7 @@
|
||||
color: #c4c4c4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ---- 编辑器主体(编辑区 + 预览区) ---- */
|
||||
/* ---- 编辑器主体 ---- */
|
||||
.editor-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
@ -263,16 +261,6 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* ByteMD 编辑器容器 */
|
||||
#editor-container {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#editor-container .bytemd {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* ---- 状态栏 ---- */
|
||||
.editor-statusbar {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user