streetwriters/notesnook

Slash commands in editor

Open

#2,559 建立於 2023年5月20日

在 GitHub 查看
 (5 留言) (8 反應) (1 負責人)JavaScript (5,325 star) (285 fork)batch import
Status: PendingType: Feature Requestgood first issue

描述

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

貢獻者指南