-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[Feature Request] Automatically convert URLs to link #1718
Comments
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "backlog" and I will leave it open. Thank you for your contributions. |
This would be a big time saver, don't kill this one silly bot. Quickly copying just the link URL to the note is not that useful because, A) many times it's not that descriptive, B) the rendered view isn't that intelligent to wrap the long URL's (it knows to wrap when it encounters a hyphen (-) but many times the URL's have some other characters that could be used to indicate a "wrap point", but the rendered view doesn't do it). |
And perhaps adding an on/off option for this feature would be wise. |
Currently links get highlighted and are clickable. |
i would like to work on this issue. is it still available? |
Yes, go for it. |
@adrijshikhar Are you still working in the issue? If not I would like to take on the task. |
Go ahead |
I don't think that this would be that useful. Best implementation would be that when no text is selected and user just pastes URL, Joplin would automatically create the markdown syntax When text is selected and something (URL or no URL) is pasted, Joplin would just do normal paste. This feature would need a settings option to turn this behavior on/off (which would be the default?). Some users might not like this feature. |
this is definitely helpful @Perkolator I'll look into it and see what I can do |
I certainly don't want this behavior. At least not by default. If it's guarded by a setting, I don't care. But Joplin connecting to the Internet, every time I paste a link, would be a showstopper for me. This is unacceptable. |
Ok, @tessus, this is to the best of my understanding, CORRECT ME IF I'm WRONG, if I was working on the PR I would go about like this, (AS mentioned by @Perkolator )
BottleNecks
Any thoughts @Perkolator @PackElend |
Thanks for the detailed explanation. Ok, this makes sense and is acceptable. However, I had the impression that this PR was about pasting a link into the editor with |
No no, this is NOT the same as the other one, I don't know what @Rishgod is messing about. This issue is about pasting URL and creating markdown syntax and description automatically. Here's my previous message again:
|
Okay can you, please clarify this, so that I understand you correctly you mean to say if we post the link in the editor it automatically gets converted into markdown URL with a title Like as soon as I paste the link it should look like what the latter looks in the gif |
Yes, that's correct. But only when no text is selected in the editor prior paste. If some text is selected, then Joplin would do normal paste. |
@Perkolator what are you basing these requirements on? |
What specifically? You can write a differentiating opinion how this could/should be implemented. |
Yes, I was going to ;) But I was wondering if your suggestions were based on an another editor? I just wanted to understand the context. My concern was overriding the standard paste function. I was thinking perhaps use Text is selected and a URL is in the clipboard: No text is selected and a URL is in the clipboard Text is selected and no URL is in the clipboard No text is selected and no URL is in the clipboard |
I'm not a fan of that But your post makes me slightly revise my suggestion: With normal No text is selected and a URL is in the clipboard: Text is selected and a URL is in the clipboard: Otherwise, when there's no URL in the clipboard, Joplin would do normal paste operation. This feature would need a settings option to turn this behavior on/off. |
At one point we discussed a e.g. |
I thought that was a separate issue #1731
Oh I didn't realise that.
Sounds good on first read. For the first scenario, I would like it as you say, but with the |
That could work too. |
That is primarily about the "insert hyperlink" popup window, it had an additional bonus, "enhanced" suggestion like what this issue primarily is about. Here's a quote from the first post of this issue:
That is a good idea. |
OK so this one is about key command, and the other is about the popup window. I think I get it now! IMO automatically formatting links when pasting into a note with a dedicated key combination is great. Retrieving info from the URL site should be optional (setting) defaulting to off. |
That's fine with me. :) |
I personally love the logic mentioned above, and the SHIFT+CTRL+V idea. If this feature workes really well and users love it, it can always be incorporated into a 'smart paste' hybrid as default CTRL+V behavior (with a settings toggle) later on. |
i would love to implement the CTRL+SHIFT+V idea to paste links that autofill the heading of a given site, @tessus can you please tell me where in the codebase should i look as i am new to this project |
I was wondering if we could make the special paste (ctrl+shift+v) for the links to auto input onto the editor in the form - where the focus will be on the hyphen right after the pasting action so that the user could modify the naming of the link as soon as he pastes. maybe later on we could implement a scraping function on this special paste? |
Is this feature implemented yet? If not can I pick it up and figure something? |
@tessus can I pick this issue up? |
Go ahead, it seems no one is working on it. |
Alright! I was able to add the feature into a context menu - #4676. I even setup stuff for getting the shortcuts going, but I am not sure how to bridge the keystrokes and commands :( |
Specifications:
|
@laurent22 would the above specs be good enough for discussion? |
@ArenaGrenade the whole point for e.g.: let's say
|
I'll be back in a few hours. I have to get some sleep.... |
Refering to your point and hence the discussion watered down the feature to what I motioned above. |
Sorry take your time :) |
As mentioned here, I completely agree with them and I feel it would only help how useful this feature might even be before taking the effort towards a scraper - thought a scraper is not very hard to implement tbf (baby steps than a giant leap :)) |
Here's what I suggested earlier: No text is selected and a URL is in the clipboard: Text is selected and a URL is in the clipboard: I personally don't like the "cursor is here" suggestions, especially (EDIT: or rather only for because I don't see myself using the other cases where "cursor is here" was suggested) for the "No text is selected and a URL is in the clipboard". |
Aight so I will reiterate the points and paste them here for the cases:
|
The other 2 cases are already handled by However, theoretically item 1 could also be handled by But these are decisions Laurent will have to make. |
True but, isn't a dialog would just be a un-necessary step as is, because we are replacing the text with the corresponding markdown URL format - people can just choose to edit it if they want. Just as a suggestion - it takes a shorter time to just press a combination of keys or press a button to see changes rather than see a dialog and make do with that to get the link working. As to the scraper - it is perfectly feasible with a bunch of regex and So, the suggestion of this as a shortcut along with context menu actions is not only feasible but could prove as a better and faster alternative to the insert hyperlink. Another way we can go about this is to keep the insert hyperlink as is and add this as an additional way to do the same thing. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions. |
notfixed |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Problem
It is sometimes tiresome to manually copy the link insert link using markdown syntax
[<description>](<URL>)
especially when I need to work with many links in a document. I am wondering if it is possible to directly convert the link with descriptions scraped from the particular website.Similar features are provided in another note-taking app (BoostNote) as is shown below. Note the description is provided by the app (probably scraped from website).
The text was updated successfully, but these errors were encountered: