How do I copy links from a word doc into a post?

Discuss technical problems and features here
User avatar
leosmith
Green Belt
Posts: 369
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Actively learning Tagalog (complete beginner)
Maintaining Spanish (~C1), Thai (~B2+), Russian (~B2+), French (~B2+), Mandarin (~B2), Japanese (~B2), Korean (~B2)
All but forgotten Swahili (~B1)
Language Log: viewtopic.php?f=15&t=5054
x 704

Re: How do I copy links from a word doc into a post?

Postby leosmith » Mon Dec 12, 2016 11:42 pm

For specific questions you will want to take time to visit our forum either as a guest or by becoming an active member of our community.
I cut and pasted this. The word "forum" should be a link, right?
0 x
: 30 / 60 Pimsleur Tagalog (60 lessons goal):

User avatar
jeff_lindqvist
Brown Belt
Posts: 1048
Joined: Sun Aug 16, 2015 9:52 pm
Languages: sv, en
de, es
ga, eo
---
fi, yue, ro, tp, cy, kw, pt, sk
Language Log: viewtopic.php?f=15&t=2773
x 1728

Re: How do I copy links from a word doc into a post?

Postby jeff_lindqvist » Mon Dec 12, 2016 11:54 pm

Yeah, if the word was a link.

By the way, Tomgosses' post works but that's probably because the whole url is visible - and that has never been a problem. If I highlight something in a sentence which has a "magic url" somewhere, and copy-paste it, only the text is pasted. (GoogleChrome)
2 x
Leabhair/Greannáin léite as Gaeilge: 9 / 18
Ar an seastán oíche: Oileán an Órchiste
Duolingo - finished trees: sp/ga/de/fr/pt/it
Finnish with extra pain : 100 / 100

User avatar
leosmith
Green Belt
Posts: 369
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Actively learning Tagalog (complete beginner)
Maintaining Spanish (~C1), Thai (~B2+), Russian (~B2+), French (~B2+), Mandarin (~B2), Japanese (~B2), Korean (~B2)
All but forgotten Swahili (~B1)
Language Log: viewtopic.php?f=15&t=5054
x 704

Re: How do I copy links from a word doc into a post?

Postby leosmith » Tue Dec 13, 2016 12:55 am

jeff_lindqvist wrote:Yeah, if the word was a link.

By the way, Tomgosses' post works but that's probably because the whole url is visible - and that has never been a problem. If I highlight something in a sentence which has a "magic url" somewhere, and copy-paste it, only the text is pasted. (GoogleChrome)

Yeah, I think you're right. I'll probably copy paste from word, toggle all the hyperlinks in the word doc, and paste the addresses into the correct places in the post to create text links in this forum. Thanks for your help.
0 x
: 30 / 60 Pimsleur Tagalog (60 lessons goal):

Doitsujin
Yellow Belt
Posts: 87
Joined: Sat Jul 18, 2015 6:21 pm
Languages: German (N)
x 136

Re: How do I copy links from a word doc into a post?

Postby Doitsujin » Tue Dec 13, 2016 10:33 am

@leosmith:

Why don't you give my method a try? It'll save you a lot of work.

If you save a word doc as a filtered html doc and open it with a text editor, a paragraph with a link in it will look like this in the html file:

Code: Select all

<p class=MsoNormal>Here's link to Google <a href="http://google.com/">Google</a></p>

Since the forum software doesn't understand HTML code, you'll need to replace HTML code with BBCode and delete unneeded tags.

If you search for </*p[^>]*> and replace it with nothing, you'll get:

Code: Select all

Here's link to Google <a href="http://google.com/">Google</a>

Now all you have to do is replace the href tags with BBCode tags by searching for <a href="([^"]+)">([^<]+)</a> and replacing it with [url=\1]\2[/url], and you'll end up with:

Code: Select all

Here's link to Google [url=http://google.com/]Google[/url]

This method works with all editors that support regular expressions, e.g. Notepad ++ or TextWrangler if you have a Mac.
4 x

User avatar
jeff_lindqvist
Brown Belt
Posts: 1048
Joined: Sun Aug 16, 2015 9:52 pm
Languages: sv, en
de, es
ga, eo
---
fi, yue, ro, tp, cy, kw, pt, sk
Language Log: viewtopic.php?f=15&t=2773
x 1728

Re: How do I copy links from a word doc into a post?

Postby jeff_lindqvist » Tue Dec 13, 2016 11:16 am

Doitsujin wrote:Why don't you give my method a try? It'll save you a lot of work.


Indeed, Find/Replace is a useful tool.
0 x
Leabhair/Greannáin léite as Gaeilge: 9 / 18
Ar an seastán oíche: Oileán an Órchiste
Duolingo - finished trees: sp/ga/de/fr/pt/it
Finnish with extra pain : 100 / 100

User avatar
leosmith
Green Belt
Posts: 369
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Actively learning Tagalog (complete beginner)
Maintaining Spanish (~C1), Thai (~B2+), Russian (~B2+), French (~B2+), Mandarin (~B2), Japanese (~B2), Korean (~B2)
All but forgotten Swahili (~B1)
Language Log: viewtopic.php?f=15&t=5054
x 704

Re: How do I copy links from a word doc into a post?

Postby leosmith » Tue Dec 13, 2016 6:35 pm

Doitsujin wrote:@leosmith:
Why don't you give my method a try? It'll save you a lot of work.

Thanks for your solution. I've never worked with a script editor, so what seems trivial to you isn't for me. Anyway, I tried it and got stuck, as I suspected I would. I could ask a bunch of questions and eventually get un-stuck, but I'd rather just do the links by hand to save time.
0 x
: 30 / 60 Pimsleur Tagalog (60 lessons goal):


Return to “Technical Support and Feature Requests”

Who is online

Users browsing this forum: No registered users and 1 guest