streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
10.31k stars 635 forks source link

Slash commands in editor #2559

Open thecodrr opened 1 year ago

thecodrr commented 1 year ago

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

RamiroPruis commented 1 year ago

Hi @thecodrr. Can I take this issue?

thecodrr commented 1 year ago

@RamiroPruis yes, go ahead.