doocs/md

支持快捷添加内容

Closed

#398 geöffnet am 11. Sept. 2024

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Vue (12.649 Stars) (2.142 Forks)user submission
enhancementgood first issuehelp wanted

Beschreibung

1. 想法

在编辑框内容为空时,展示 placeholder:输入 "/" 快捷添加内容

image

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

image

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

image

2. 参考

LeetCode 新版编辑器

image

Contributor Guide