3 条评论 (3 条评论)0 个反应 (0 个反应)0 位负责人 (0 位负责人)Vue2,142 个派生 (2,142 个派生)user submission
enhancementgood first issuehelp wanted
仓库指标
- 星标
- 12,649 个星标 (12,649 个星标)
- PR 合并指标
- 平均合并 1天 11小时 (平均合并 1天 11小时)30 天内合并 99 个 PR (30 天内合并 99 个 PR)
描述
1. 想法
在编辑框内容为空时,展示 placeholder:输入 "/" 快捷添加内容

用户输入 / 时,唤起选项弹窗,示例:

- 用户选中 "H1" 时,移除编辑框中的 /,并自动添加 '# ' 到目前光标所在位置
- 用户选中 ”代码块“时,自动添加 ```\n\n```
- 用户选中”公式块“时,弹出公式编辑窗

2. 参考
LeetCode 新版编辑器

贡献者指南
- 研究方向
- First, understand the current editor implementation. Look at the editor component in src/ directory and identify how keyboard events are handled. Then, design a slash command plugin that intercepts '/' keypress when editor is empty, displays a popup with options like H1, code block, math block, and inserts appropriate markdown syntax. Reference the LeetCode editor for UX inspiration. Check if there is an existing popup or dropdown component to reuse.
- 技术栈
- vuejavascripthtmlcss
- 领域
- frontend
- 议题类型
- 功能
- 前置要求
- Vue.jsMarkdown editor basics