gsantner / gsantner/markor

Change the default behaviour for handling links to .html files

Open
#2,201 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
537
Avg merge
1d 18h
Merged PRs (30d)
4

Description

# IMPORTANT
* App version: 2.11.1 installed from the F-Droid Repository
* Android version/rom: Android 13
* Device: Google Pixel 4a
* I accept that this issue will be closed without further notice in case I didn't describe the problem including general information, or didn't [search](https://github.com/gsantner/markor/issues?q=) for similar issues & [requests](https://github.com/gsantner/markor/discussions?discussions_q=).

## Explain the Problem

### The issue I have

1. Add a link to a local HTML file in a markdown note in Markor
2. Switch to the view mode in Markor and then tap on the link added above
3. Markor will show the HTML code of the file

### My request

I would like Markor to either prompt me to open a link to a local HTML file in my web browser or simply open it in the webview like it does for regular URL links.

### Screenshots for additional explanation

The image below shows an example of a markdown file with links to a .html file and a .pdf file.

![01](https://github.com/gsantner/markor/assets/71387553/b577e458-8a1e-4247-981a-b79c78bad7ce)

When I open the link to the .html file, Markor handles it as a HTML code file -

![03](https://github.com/gsantner/markor/assets/71387553/60dcc19a-993d-4e05-97ee-abe3e7a37160)

When I open the link to the local PDF file, I am prompted to open it with an external application -

![02](https://github.com/gsantner/markor/assets/71387553/414f06bf-4fa7-4788-a0fb-cbe12b25ff1b)

I would like a similar prompt for links to local HTML files as well.

### Additional Context and Usecase

I often use the [SingleFile](https://addons.mozilla.org/en-US/firefox/addon/single-file/) Firefox extension to save blog posts, articles, guides etc., so that I can read them later. Then I add links to such .html files in my personal notes for future reference.

I should also add that unlike what is shown in the second screenshot above, most of the time **Markor simply freezes** when I open a link to such a .html file saved with the SingleFile extension and then I have to force kill the app. Otherwise I could have simply used the "Open With" action button and this would not be an issue. (I have checked that this is not an issue with the .html files saved by the SingleFile extension because the same files open without any issue with any web browser application.)

I'm not aware if Markor intends to be an application for HTML coding but from what I understand, the preference under "Settings > General > Always open with this app" can already let a user open .html files with Markor if specified. Therefore, even if the default behaviour to handle .html files was changed to open them in webview, it should not be a problem for those who prefer the current behaviour?

I hope I was able to make the issue clear to understand. Thank you for creating this wonderful application.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.