3 comments (3 comments)0 reactions (0 reactions)0 assignees (0 assignees)Vue2,142 forks (2,142 forks)user submission
enhancementgood first issuehelp wanted
Repository metrics
- Stars
- 12,649 stars (12,649 stars)
- PR merge metrics
- Avg merge 1d 11h (Avg merge 1d 11h)99 merged PRs in 30d (99 merged PRs in 30d)
Description
1. 想法
在编辑框内容为空时,展示 placeholder:输入 "/" 快捷添加内容

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

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

2. 参考
LeetCode 新版编辑器

Contributor guide
- Research direction
- 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.
- Tech stack
- vuejavascripthtmlcss
- Domain
- frontend
- Issue type
- Feature
- Prerequisites
- Vue.jsMarkdown editor basics