streetwriters/notesnook

Slash commands in editor

Open

#2,559 opened on 2023年5月20日

GitHub で見る
 (5 comments) (8 reactions) (1 assignee)JavaScript (5,325 stars) (285 forks)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

コントリビューターガイド

Slash commands in editor · streetwriters/notesnook#2559 | Good First Issue