[Bug] Link to a local file does not work correctly
Bug Description
entering a link to a file by hand works e.g.
I can open the file with the link
but if I only enter text and then create a link via the menu and enter the path to the file, an error "broken link" appears
it works with a weblink
How to Reproduce
see pictures
Expected Behavior
i think that both ways of creating a link should work
Operating System
linux
AppFlowy Version(s)
0.5.4
Screenshots
No response
Additional Context
No response
I believe the scheme of http | https is currently hardcoded.
We should be able to allow IPv4/6, SSH, (S)FTTP, SMTP, and other protocols such as the File protocol that is mentioned in this issue.
Some other protocols that could be taken on as well: mailto, vnc, and imap.
Hi! Can I work on this issue?
I found the relevant place in appflowy-editor, seems like current isUrl validator understands only http, https and ftp
https://github.com/AppFlowy-IO/appflowy-editor/blob/a64a5165e79bd2424e594b793843a7158e7d4fb4/lib/src/editor/toolbar/desktop/items/link/link_menu.dart#L119
Hi! Can I work on this issue? I found the relevant place in
appflowy-editor, seems like currentisUrlvalidator understands onlyhttp,httpsandftphttps://github.com/AppFlowy-IO/appflowy-editor/blob/a64a5165e79bd2424e594b793843a7158e7d4fb4/lib/src/editor/toolbar/desktop/items/link/link_menu.dart#L119
I'm not too sure what the desired behavior is, if we should allow eg. file protocol for collaborative workspaces.
It could lead to misleading information where one user believe they have access to a file but in reality, it exists on the local of someone elses device, meaning if they follow the link they won't be able to find what they're looking for.
Anyhow, feel free to open a PR, and we can take a look.
@Xazin hi! Could you please take a look at PR or point out some direction I could work on? Thank you!