doocs/md

支持快捷添加内容

Closed

#398 aberto em 11 de set. de 2024

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)Vue (12.649 stars) (2.142 forks)user submission
enhancementgood first issuehelp wanted

Description

1. 想法

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

image

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

image

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

image

2. 参考

LeetCode 新版编辑器

image

Guia do colaborador