mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 12:56:59 +00:00
[GH-ISSUE #7214] [FR] Pasting url should paste a link and when there's a highlighted selection it should make it into a link #3191
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#3191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chrisirhc on GitHub (Jan 15, 2025).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/7214
Originally assigned to: @asjqkkkk on GitHub.
Description
This is a behaviour documented over at https://github.com/yzhang-gh/vscode-markdown/issues/20 .
Current behaviour on Mobile iOS
Pasting a link results in noop, nothing happens, nothing is pasted. Regardless of whether a selection is highlighted or not.
Expected behaviour
During a past of a URL:
Impact
Additional Context
No response
@LucasXu0 commented on GitHub (Jan 15, 2025):
Hi @chrisirhc, we support making the selected text into a link format when there is a highlighted selection. If it's not working on your end, there might be an issue. Could you tell me your iOS system version?
https://github.com/user-attachments/assets/7bf985c2-5fa5-490f-8fce-d03fae29f8d6
@chrisirhc commented on GitHub (Jan 15, 2025):
Ah, tested it a bit more and found that I saw a few issues I'm facing:
I'm on iOS 18.2 .
Recording with behavior of GitHub:
https://github.com/user-attachments/assets/f5b05311-d5ad-4b50-9309-df5716cc2079
@asjqkkkk commented on GitHub (Jan 18, 2025):
https://github.com/user-attachments/assets/d7a16659-2e28-45f9-9013-71303e646a70
I have found a stable way to reproduce it, it can be reproduced simply by pasting from the clipboard of the input method
@Craigp23 commented on GitHub (Jan 19, 2025):
Is this a related issue...?
Since v0.80 on android, urls are no longer being converted to links. Tried top and tailing the url with markdown ie. [ ]
@chrisirhc commented on GitHub (Jan 24, 2025):
Created 2 PRs to demonstrate the issues and potential fixes. The fixes are ugly/hacky because I'm a flutter newbie. They're mainly to illustrate the issue.
https://github.com/AppFlowy-IO/AppFlowy/pull/7280
This is due to the following regex only checking for urls that begin with
http:github.com/AppFlowy-IO/appflowy-editor@d24a7fc2c3/lib/src/service/internal_key_event_handlers/copy_paste_handler.dart (L6)https://github.com/AppFlowy-IO/appflowy-editor/pull/1027
Happy to update the fixes based on review suggestions if I receive any review feedback.
@asjqkkkk commented on GitHub (Jan 24, 2025):
Hi @chrisirhc , Have you had any issues pasting HTTP links on mobile? Such as https://github.com/, or perhaps only links that don't start with HTTP cause the issue? Such as bear://x-callback-url/open-note
@chrisirhc commented on GitHub (Jan 24, 2025):
Yes, I'm seeing issues whenever there's the permission screen to allow paste from the application. See https://github.com/AppFlowy-IO/appflowy-editor/pull/1027 .
I'm also seeing issues whenever pasting what's copied from the Share button. See https://github.com/AppFlowy-IO/AppFlowy/pull/7280 .
@asjqkkkk commented on GitHub (Jan 24, 2025):
Thank you, there might indeed be a permission issue currently. As for whether links that don't start with HTTP can be pasted as links, we may need to double-check the specifications for links
@chrisirhc commented on GitHub (Jan 24, 2025):
Links that don't start with HTTP can be pasted as links. There's no permission issue for that.
The permission dialog I'm referring to is in https://github.com/AppFlowy-IO/appflowy-editor/pull/1027 .
They can be, you can test this behaviour today by creating a link manually and using a non-http url works fine. I have clicked on it and it navigates to the other app as expected.
Update: I'll split up the bug reports, since they're 3 distinct issues with separate reproduction steps.
@chrisirhc commented on GitHub (Jan 25, 2025):
I created 2 bug reports:
I didn't create a bug for non-http protocol urls because I can see potential security concerns and also because there is a workaround (via manually pasting into link text field).