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

Markdown: Add code block button + enable shortcut #6689

Conversation

MaxGyver83
Copy link
Contributor

When using the markdown plugin, you can enter fenced code blocks in markdown tiddlers but there is no button in the editor toolbar and the usual shortcut (ctrl-shift-M) doesn't work either.

This pull requests adds a code block button (same as for regular tiddlers) and by that, the shortcut works without further code changes.

icon: $:/core/images/mono-block
caption: {{$:/language/Buttons/MonoBlock/Caption}} (Markdown)
description: {{$:/language/Buttons/MonoBlock/Hint}}
condition: [<targetTiddler>type[text/x-markdown]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Condition should be like this: [<targetTiddler>type[text/x-markdown]] [<targetTiddler>type[text/markdown]] since both types are possible now. Also see: #6528

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I have changed it.

@Jermolene
Copy link
Member

Great stuff, thanks @MaxGyver83

@Jermolene Jermolene merged commit 34f9cd9 into TiddlyWiki:master May 12, 2022
@MaxGyver83 MaxGyver83 deleted the feature/enable-code-block-button-and-shortcut-in-markdown-tiddlers branch May 12, 2022 17:00
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

Successfully merging this pull request may close these issues.

3 participants