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

Discuss technical problems and features here
User avatar
leosmith
Brown Belt
Posts: 1341
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
x 3098
Contact:

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
https://languagecrush.com/reading - try our free multi-language reading tool

User avatar
jeff_lindqvist
Black Belt - 3rd Dan
Posts: 3135
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 10461

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

Llorg Blog - Wiki - Discord

User avatar
leosmith
Brown Belt
Posts: 1341
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
x 3098
Contact:

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
https://languagecrush.com/reading - try our free multi-language reading tool

Doitsujin
Green Belt
Posts: 402
Joined: Sat Jul 18, 2015 6:21 pm
Languages: German (N)
x 801

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
Black Belt - 3rd Dan
Posts: 3135
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 10461

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

Llorg Blog - Wiki - Discord

User avatar
leosmith
Brown Belt
Posts: 1341
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
x 3098
Contact:

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
https://languagecrush.com/reading - try our free multi-language reading tool


Return to “Technical Support and Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests