Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keystroke markdown #70

Open
Mirdarthos opened this issue Mar 11, 2022 · 4 comments
Open

Add keystroke markdown #70

Mirdarthos opened this issue Mar 11, 2022 · 4 comments

Comments

@Mirdarthos
Copy link

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.
@Komediruzecki
Copy link
Collaborator

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

@Mirdarthos
Copy link
Author

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.

@Komediruzecki
Copy link
Collaborator

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

@Mirdarthos
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants