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

Pasting with a URL on the clipboard #1609

Open
scripting opened this issue Jan 6, 2025 · 0 comments
Open

Pasting with a URL on the clipboard #1609

scripting opened this issue Jan 6, 2025 · 0 comments

Comments

@scripting
Copy link

Description

This is a question about a feature, not a bug report.

A user has requested the following behavior.

  1. There's a URL on the clipboard.
  2. They select some text.
  3. Paste.

What they want to happen is that the text that was selected is replaced with a link.

If the text was Hollywood.

And https://hollywood.gov/ is on the clipboard.

The selected text would be replaced with:

<a href="https://hollywood.gov/">Hollywood</a>

Why?

Apparently this is standard in software like Slack, and it's a natural feature, and it sounds appealing to me.

GitHub has the feature too. ;-)

I tried to implement

Subscribed to editablePaste event, but never got the call.

Every attempt to implement resulted in the URL on the clipboard replacing the selected text.

Version 5.23 according to MediumEditor.version.

Any help much appreciated.

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

No branches or pull requests

1 participant