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 link(ify) button and enable shortcut (ctrl-L) #6691

Conversation

MaxGyver83
Copy link
Contributor

When using the markdown plugin, there is neither a link nor a linkify button in markdown tiddlers. The corresponding shortcuts (shift-alt-L and ctrl-L) don't work.

This pull requests adds a link button (same as for regular tiddlers) which works like the linkify button for regular tiddlers but it inserts []() instead of [[]]. This enables the default link shortcut ctrl-L.

Probably the best solution would be to add both a linkify button (which inserts []()) and a link button (which opens a popup menu in which you can search existing tiddlers). But I don't know how to create an icon ([*]()) matching the style of the existing icons (image) nor do I know how I could migrate the popup menu. So this PR is not the perfect solution but nevertheless an improvement of the current situation.

@Jermolene Jermolene merged commit 775c7f0 into TiddlyWiki:master May 12, 2022
@Jermolene
Copy link
Member

Thanks @MaxGyver83

Probably the best solution would be to add both a linkify button (which inserts []()) and a link button (which opens a popup menu in which you can search existing tiddlers).

That sounds good.

But I don't know how to create an icon ([*]()) matching the style of the existing icons (image)

I can probably stitch together something here. I may not be able to do it for a few days though.

nor do I know how I could migrate the popup menu.

Have you run into any particular problems?

So this PR is not the perfect solution but nevertheless an improvement of the current situation.

I think people do sometimes hold back from making PRs with modest improvements, but in fact of course the cumulative impact is immense, and they tend to be easier to process. So do please keep them coming.

@MaxGyver83 MaxGyver83 deleted the feature/enable-link-button-and-shortcut-in-markdown-tiddlers branch May 13, 2022 19:55
@MaxGyver83
Copy link
Contributor Author

Have you run into any particular problems?

The problem with the link popup (dropdown) menu (link-dropdown.tid) was that it creates only WikiText style links. It turned out, I just had to create a function make-markdown-link (analogous to make-link). See #6693.

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.

2 participants