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

Allow inline geo: links to open in Map View by default #144

Closed
alexking opened this issue Feb 26, 2023 · 6 comments
Closed

Allow inline geo: links to open in Map View by default #144

alexking opened this issue Feb 26, 2023 · 6 comments
Labels
p1 High

Comments

@alexking
Copy link

It's currently possible to open inline links in Map View by right clicking and selecting "Open in Map View", but left clicking will attempt to open a geo: handler (which doesn't work on Windows, and several other platforms - #114, #115). I'd like to be able to choose the default left click action to open geo:, the Map View, or one of my Custom "Open In" actions. This seems to be a feature others are interested in as well.

Unsure how best to implement this while keeping the geo: url scheme in the markdown files (#18) - wondering if it would be possible to override the click event for inline geo links and either allow it to pass through, or preventDefault() based on plugin settings?

@esm7
Copy link
Owner

esm7 commented Feb 27, 2023

I looked into this in the early days of the plugin and was unable to find a good way to do it with the Obsidian API (even after consulting in the plugin-dev Discord channel). However, it's great that you bring it up now, because I actually think it's very much possible nowadays!
I'll definitely look into it. The current behavior is less than satisfactory.

@esm7
Copy link
Owner

esm7 commented Apr 23, 2023

Just wanted to update here that I spent a few hours on it in the past weeks with no luck yet (kidnapping Obsidian's link handling in Edit mode is overly complicated), but I won't give up until I get it to work!

@esm7
Copy link
Owner

esm7 commented May 14, 2023

I finally managed to figure out how to utilize an editor extension to do this and it works 😎
In the upcoming days I'll test it out in desktop and mobile, add Reading Mode support (which is considerably easier), and possibly play around with some interesting new possibilities that opened up due to this :)

@esm7
Copy link
Owner

esm7 commented May 23, 2023

I just released this in 3.1.0 and would love some feedback if it works for you as expected.
I also added a nice treat, off by default but very nice I think, of map preview popups.

@esm7
Copy link
Owner

esm7 commented May 23, 2023

(rolled back the release because I made a mistake in the process, will hopefully re-release it tomorrow)

@esm7
Copy link
Owner

esm7 commented May 23, 2023

(update: fixed and re-released now)

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

No branches or pull requests

2 participants