Pasting a URL Without Changing Formatting

User avatar
TromboneAl
Posts: 1070
Joined: Sun Jan 19, 2014 2:17 pm
Platform: Mac

Wed Jun 05, 2019 6:01 pm Post

I often paste a URL into the Notes for a document. It makes it a link and changes the text color to blue and underlines it.

However, if I add more text to the note, that new text be blue and underlined (though it's not a link). IOW, I need to change the text color and remove the underlining if I want to add more text to the note.

It would be nice if I didn't have to do that.
Al Macy
I usually have the latest Scrivener and Scapple versions.
Let me copy/paste the version from the About box, and I will add it to my signature.

User avatar
krastev
Posts: 591
Joined: Fri Feb 05, 2016 5:21 am
Platform: Windows
Contact:

Wed Jun 05, 2019 6:50 pm Post

Double tap 'Enter'.
Paste your link on the first line.
continue to add text to notes without the need to change color or underline.
Krastev
Windows 10 Home 64-bit
Scrivener for Windows Version 1.9.16.0
Testing Scrivener Beta for Windows

User avatar
AmberV
Posts: 24872
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Thu Jun 06, 2019 2:17 pm Post

Yeah, that “paste into blank line” method is what I typically do for most things, where I wish to paste formatting (though the ⌥⌘0 shortcut to clear paragraph and character formatting has mitigated the need for that older approach).

One odd thing about your description though is that with purely Scrivener (or really macOS to be technical) generated hyperlink recognition, the formatting should not continue like bold or italic formatting would. It is in fact not formatting in the traditional sense, but a dynamic overlay that works more like syntax highlighting would, in a coding editor.

Maybe the source of your links is the culprit? If the source is adding deliberate blue and underline formatting to the text on top of being a hyperlink, then it would be logical for Scrivener to continue that formatting normally, just as it would with bold text or anything else along those lines.

To confirm, try pasting the URL itself as plain-text into the editor, letting the editor recognise it, and then continuing to type off of it. You may even notice the whole URL “breaks” if you type without spaces.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
gr
Posts: 2314
Joined: Wed Feb 14, 2007 3:57 am
Platform: Mac + iOS
Location: Florida

Thu Jun 06, 2019 6:12 pm Post

For Scrivener, I have swapped the shortcuts for Paste and Past and Match Style, because I almost always want the latter.
gr : Scrivener user : not affiliated with Lit^Lat
Image
"Nothing, like something, happens anywhere." —Philip Larkin

User avatar
TromboneAl
Posts: 1070
Joined: Sun Jan 19, 2014 2:17 pm
Platform: Mac

Fri Jun 07, 2019 11:55 pm Post

AmberV wrote:
To confirm, try pasting the URL itself as plain-text into the editor, letting the editor recognise it, and then continuing to type off of it. You may even notice the whole URL “breaks” if you type without spaces.


Here's what happens:

If I copy the URL from the address line in Chrome, and paste it into the notes, it works as I described above. That is, it turns it into a link and the blue underlined formatting continues.

If, however, I copy that same URL into a text file, then copy from there and paste into the notes, it doesn't change it to a link at all.

Screen Shot 2019-06-07 at 4.54.35 PM.jpg
Screen Shot 2019-06-07 at 4.54.35 PM.jpg (46.45 KiB) Viewed 1636 times
Al Macy
I usually have the latest Scrivener and Scapple versions.
Let me copy/paste the version from the About box, and I will add it to my signature.

User avatar
AmberV
Posts: 24872
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat Jun 08, 2019 11:10 am Post

Hmm, do you have the Automatically detect web addresses option enabled in the Corrections preference pane? That should be a detected URL, though the algorithm does sometimes struggle, I’ve never seen it struggle with simple URLs like forum links. If you don’t mind having that option enabled, then doing so, and using plain-text pasting should resolve the main problem.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
TromboneAl
Posts: 1070
Joined: Sun Jan 19, 2014 2:17 pm
Platform: Mac

Sat Jun 08, 2019 2:09 pm Post

AmberV wrote:Hmm, do you have the Automatically detect web addresses option enabled in the Corrections preference pane? That should be a detected URL, though the algorithm does sometimes struggle, I’ve never seen it struggle with simple URLs like forum links. If you don’t mind having that option enabled, then doing so, and using plain-text pasting should resolve the main problem.


No, I have that unchecked because I referred to a web site in one of my books, and not in the front or back matter, and I didn't want it turned into a link.

Now that I know that Chrome is futzing around with the formatting, I'll just use the blank line approach.

Thanks.
Al Macy
I usually have the latest Scrivener and Scapple versions.
Let me copy/paste the version from the About box, and I will add it to my signature.

lo
lometogo
Posts: 127
Joined: Thu Aug 21, 2014 5:08 am
Platform: Mac
Location: Vung Tau, Vietnam

Tue Jun 25, 2019 7:48 am Post

[quote="TromboneAl"]I often paste a URL into the Notes for a document. It makes it a link and changes the text color to blue and underlines it.

Hi Al, I have a sort of, kinda similar situation, and I wonder if you might help (or you Oracle Amber): I was looking through an old Scrivener project, and I noticed that I had created an item with 40-50 tweets from Allmytweets.net and each one appeared with hyperlinks.

I've tried to recreate this, several months later, not remembering what I did last time, and can't make it work. If I cut and paste the page of tweets, they copy but without hyperlinks.

FYI, here's an image of the page I created earlier, with clickable hyperlinks.

Any info you can give would be much appreciated.
Attachments
Twitter posts and links in Scrivener.jpg
Twitter posts and links in Scrivener.jpg (101.73 KiB) Viewed 1550 times

User avatar
AmberV
Posts: 24872
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Tue Jun 25, 2019 11:15 am Post

A few things to check:

  • Hyperlinks are a form of rich text formatting. Do other forms of formatting vanish when you copy and paste, such as bold and italic text?
  • Have you double-checked to make sure those are actually links? They look like it, but if you click on them do they do anything, or are they just blue text with an underscore?
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

lo
lometogo
Posts: 127
Joined: Thu Aug 21, 2014 5:08 am
Platform: Mac
Location: Vung Tau, Vietnam

Wed Jun 26, 2019 12:07 am Post

Amber,

Yes, they are definitely hyperlinks.

I was unable to quickly find bolded/italicized formatting on a webpage, but when I copy/pasted a snippet of formatted text from a Word document, it failed to materialize in Scrivner as well.

If I laboriously (poor, poor me) copy the destination link from the original document and hyperlink it to the corresponding text in Scrivener, it works perfectly.

Hmmmm.

Thanks for trying, and any additional solutions will be gladly accepted.

Terrance

User avatar
gr
Posts: 2314
Joined: Wed Feb 14, 2007 3:57 am
Platform: Mac + iOS
Location: Florida

Wed Jun 26, 2019 12:53 am Post

Are you by any chance using Paste and Match Style rather than straight Paste?
gr : Scrivener user : not affiliated with Lit^Lat
Image
"Nothing, like something, happens anywhere." —Philip Larkin

User avatar
AmberV
Posts: 24872
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Wed Jun 26, 2019 7:58 am Post

If you are losing all formatting, then it is likely you changed the default paste assignment to Paste and Match Style in Scrivener, or you have installed a clipboard manager that is stripping formatting for you. You can test the former by using the Edit ▸ Paste... command specifically, instead of the keyboard shortcut. The latter would require disabling your clipboard manager temporarily, to see if that improves the situation.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
annewalk
Posts: 18
Joined: Wed Oct 14, 2009 1:29 am
Platform: Mac
Location: Toronto, Ontario, Canada
Contact:

Wed Sep 30, 2020 12:22 pm Post

gr wrote:For Scrivener, I have swapped the shortcuts for Paste and Past and Match Style, because I almost always want the latter.

This is a great idea. I hate fiddling with the styles, constantly fixing issues because I did a simple paste. I wish the default was to match style. I’m going to do this as well. Thanks!