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
fix: Link can't be pasted on selected text in block content #7618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. This works as advertised
EDIT: for core team
I'm surprised we have existing functionality like this for paste as I consider it surprising for selected text to combine with something from the clipboard. I think this untested complexity is a reason why we have a number of copy paste bugs. My advice would be not add more functionality like this but I'll defer to someone else for this review
@logseq-cldwalker afaik GitHub does the same thing when you select some text and paste a URL. |
I do think that the warning notification here is not needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the fix!
@tiensonqin Fair point 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sallto Thanks for the fix! 👍 🚢 My previous comment was intended more for the core team. Tienson made a good point about this becoming a more common paste functionality so I remove my main concern
fixes #7268
Fixed by testing whether text is selected while pasting and formatting accordingly
The code is kinda ugly, but I don't know of a nicer way