streetwriters/notesnook

Slash commands in editor

开放

#2,559 创建于 2023年5月20日

 (5 条评论) (9 个反应) (1 位负责人)JavaScript (285 个派生)batch import
Status: PendingType: Feature Requestgood first issue

仓库指标

星标
 (5,325 个星标)
PR 合并指标
 (平均合并 11天 5小时) (30 天内合并 55 个 PR)

描述

What problem are you facing?

Using the toolbar for adding different types of formats can become cumbersome and unwieldy. While Markdown shortcuts work for basic things like bold, italic etc., they aren't useful for adding complex widgets such as tables, outline lists etc. Secondly, it can be a chore for people to remember all the different markdown shortcuts.

What's the solution you'd like to see in Notesnook?

We can do what a lot of other editors are doing: use / as an entrypoint for showing a list of filterable formats. For example:

  1. Typing / on a new line
  2. A menu popups up with 5 most used formats
  3. Anything typed after / is used as a query to filter formats
  4. Pressing Enter inserts the specified format.

One thing to note here is that / commands are only for block level nodes like:

  1. Tables
  2. Lists
  3. Outline list
  4. Task list
  5. Blockquote
  6. Codeblock

What alternatives have you considered?

Using the toolbar with a mouse or keyboard shortcuts.

Additional context

No response

贡献者指南