BoostNote.next-local icon indicating copy to clipboard operation
BoostNote.next-local copied to clipboard

Add keystroke markdown

Open Mirdarthos opened this issue 3 years ago • 4 comments

Current behavior

Currently, when adding a keystroke to a note, for example Up I have to use the HTML <kbd></kbd> tags.

Expected behavior

While this works fine, it would be much quicker to have a Markdown tag for it. I suggest double pipes. For example:

||Up||

Additionally

Additionally, it would also be awesome if the keystrokes are then displayed a bit differently thann the current text. Say, 110% size, in bold. Or something like that.

Environment

  • Boost Note.next version: 0.22.3
  • OS version and name: Manjaro Linux 21.2.4, but I don't think it makes a difference for this.

Mirdarthos avatar Mar 11 '22 14:03 Mirdarthos

Hi,

I don't think we would get much by replacing the standard kbd tag with those pipes.

However, for styling, you can easily do it through markdown preview CSS. You can change the current one or add completely your own style:

image

With these changes: image

Komediruzecki avatar Mar 31 '22 20:03 Komediruzecki

The pipes would just have made the note typing much easier. It is a lot easier, and thus quicker, to type || Up || then it is to type <kbd>Up</kbd>, that's all.

Regarding the styling, thank you, I've just implemented it.

Mirdarthos avatar Apr 07 '22 13:04 Mirdarthos

This would make it uncustom markdown, thus not so portable, do you have any examples of systems using this approach?

Komediruzecki avatar Apr 12 '22 11:04 Komediruzecki

Unfortunately not. And I understand the portability, so it's OK. Just tried to give feedback and suggest a useful feature. I understand if it can't.

Another option, that I just though of, and I'd write a plugin to do this for myself if possible, is to "parse" the markdown when saving it and look for the || <string> || pattern, replacing it with <kbd> <string> </kbd>. Or even as you type, or so on.

Mirdarthos avatar Apr 12 '22 11:04 Mirdarthos