ae6d80c9cc
fix(editor): 修复滚动比例同步失效导致切换到底部
...
原 syncScrollRatio 封装在 display:'none' 之后重复读取源容器
scrollTop,此时浏览器已将其归零,导致比例计算为 0。改为提前
读取比例并直接应用,移除二次封装与调试日志。
2026-06-16 15:58:50 +08:00
914f168551
fix(editor): 切换视图时按滚动比例同步位置
...
修复切回富文本时编辑器滚动到底部的问题:移除 commands.focus()
(会强制滚动到光标位置),改用滚动比例跨模式同步,富文本与源码
视图按相同比例定位,保持视觉位置一致。
2026-06-16 15:53:28 +08:00
480aa92bb4
feat(editor): 新增 Markdown 源码视图切换
...
在 Tiptap 编辑器右上角增加 </> 悬浮按钮,支持在富文本与
Markdown 源码视图间双向切换,内容自动同步。getMarkdown() 在
源码模式下返回 textarea 内容,使 Rust 端提交逻辑无需改动。
2026-06-16 15:50:09 +08:00
012704d0a5
chore(tiptap-editor): update package-lock.json
2026-06-08 15:54:27 +08:00
72ba8ea9ec
chore(tiptap-editor): update package-lock.json
2026-06-06 00:29:53 +08:00
078e9b1da1
fix(tiptap-editor): configure link via StarterKit to avoid duplicate extension warning
2026-06-05 18:19:24 +08:00
ad208a4603
fix(tiptap-editor): correct setContent call signature for markdown parsing
2026-06-05 18:05:47 +08:00
26eb62c2ae
fix(upload): disable default body limit and fix error object serialization
2026-06-05 16:52:52 +08:00
c2c7b46958
fix(tiptap-editor): use insertContentAt with drop position in onDrop handler
...
Previously dropped images were inserted at the current cursor position
instead of the actual drop position. Now uses insertContentAt(pos, ...)
to place images at the correct location.
2026-06-05 15:21:38 +08:00
00c5a880f4
feat(editor): add FileHandler extension for image paste/drop upload
2026-06-05 15:19:31 +08:00
3d7dd5b5a5
deps(editor): add @tiptap/extension-file-handler
2026-06-05 15:17:39 +08:00
a8704e199f
feat(editor): add slash command, table, task list, image and link extensions
...
- Add @tiptap/suggestion-based slash command menu with 12 commands
- Add TableKit for table support (3x3 with header)
- Add Image extension with base64 support
- Add Link extension with autolink and paste detection
- Add TaskList/TaskItem extensions for checklists
- Upgrade all tiptap packages from 3.23.6 to 3.25.0
- Add CSS styles for all new features including dark theme
2026-06-05 10:20:47 +08:00
cd45ab17de
build: simplify tiptap build by setting fixed output filename in vite config
2026-06-04 16:26:25 +08:00
956b2d7374
修复编辑器暗色主题和列表样式
...
- CSS 暗色主题选择器从 [data-theme="dark"] 改为 .dark
- 恢复无序列表圆点(覆盖 Tailwind preflight 重置)
- placeholder 改用 :has() 选择器适配 Tiptap v3
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 18:02:52 +08:00
f6d60520eb
集成 Tiptap Markdown 编辑器到文章撰写页面
...
- 新增 libs/tiptap-editor/ 打包子项目(Tiptap Core + StarterKit + Markdown)
- 构建产物输出到 public/tiptap/
- 替换原有的 textarea + pulldown_cmark 预览为 WYSIWYG 编辑器
- Makefile 新增 build-editor target
- Dioxus.toml 引入 editor.js 和 editor.css
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:46:04 +08:00