feat(markdown-editor): 表情面板支持插入论坛表情 - #69
Open
shellRaining wants to merge 1 commit into
Open
Conversation
shellRaining
force-pushed
the
feature/markdown-editor-emoji
branch
from
August 4, 2026 16:08
7c9f171 to
49c0cb6
Compare
shellRaining
force-pushed
the
feature/markdown-editor-emoji
branch
from
August 4, 2026 16:15
49c0cb6 to
5efbd50
Compare
- topBar 新增表情按钮,弹出分类表情面板(CC98 / AC娘 / 麻将脸 / 贴吧 / 雀魂 / 经典) - 点击表情在光标处插入 Markdown 图片,与 UBB→Markdown 迁移输出一致 - 表情枚举复用 packages/ubb 的 resolveUbbEmotionTag 规则并校验 - 所见即所得:插入面板当前主题版本(暗色插入 ac-dark),渲染端双向适配 ac/ac-dark - 面板为右上角弹出的小框,带动画;格子尺寸沿用原 UBB 编辑器习惯 - 新增 emoji-data 与渲染端单测
shellRaining
force-pushed
the
feature/markdown-editor-emoji
branch
from
August 4, 2026 16:22
5efbd50 to
0bc7f7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Markdown 编辑器(Milkdown Crepe)此前没有输入论坛表情的入口。本次在编辑器工具栏新增表情按钮,弹出分类表情面板,点击表情即在光标处插入标准 Markdown 图片,插入结果与 UBB→Markdown 迁移输出一致(如
)。改动
apps/website/src/components/markdown-editor/emoji-data.ts(新增):按packages/ubb的resolveUbbEmotionTag合法范围生成六类表情(CC98 37 / AC娘 149 / 麻将脸 234 / 贴吧 33 / 雀魂 54 / 经典 92),每个条目经解析器校验;含表情按钮图标(取自heroicons:face-smile-solid)与emotionToMarkdown、resolveEmotionDisplaySrc。apps/website/src/components/markdown-editor/EmojiPanel.vue(新增):分类 tab + 表情网格面板,右上角弹出小框带动画;AC 娘在暗色模式展示ac-dark资源;格子尺寸沿用原 UBB 编辑器习惯(AC 娘大图、麻将脸小图)。apps/website/src/components/MarkdownEditor.vue:通过 CrepetopBar的buildTopBar钩子追加表情按钮;点击表情在光标处插入 image 节点(所见即所得:插入面板当前主题版本,暗色模式插入ac-dark);外部点击关闭面板。apps/website/src/components/rich-content/markdown/:Markdown 渲染端对 CC98 AC 娘图片做双向主题适配(暗色ac→ac-dark、亮色ac-dark→ac),与 UBB 渲染端UbbEmotion.vue规则一致,任何主题下内容都显示正确。markdown-editor-emoji.test.ts5 个用例 +content-renderer.test.ts渲染端主题适配 3 个用例。验证
vp run ready全绿(format / lint / typecheck / build / knip / 全仓测试 website 299 + ubb 187 + api 21)。ac-dark图片(所见即所得)、亮色模式插入得到白天版。亮色模式面板:
暗色模式 AC 娘(使用
ac-dark资源):关联
docs/exec-plans/active/2026-08-04-markdown-editor-emoji.md