How to copy text from a webpage in TW and retain formatting

Share your favorite tips, workarounds and shortcuts for theWord
csterg
Site Admin
Posts: 8627
Joined: Tue Aug 29, 2006 3:09 pm
Location: Corfu, Greece
Contact:

How to copy text from a webpage in TW and retain formatting

Post by csterg »

This tip applies to TW3 ver. 3.0.0.640 and above (where editing of modules is enabled).

Normally, when you copy text from a web-page into TW's editor, all formatting should be preserved (e.g. bold, italics, images, etc). Unfortunately this does not happen with Firefox or Opera but only with Internet Explorer (IE).

How to fix the Firefox issue:
1. Use IE just for the cases you want to copy something in TW and preserve formatting
2. If you have "MS Word" (Word) or "OpenOffice Write" (Write - this is free), you can use either of these programs as an inter-mediate step to get the formatting. Copy the text from Firefox into Word or Write, and then re-select the entire text from within Word or Write and copy it again. Then paste it in TW and all formatting will be there.

How to insert .html you have on your disk
1. Open them with IE and copy/paste
2. Open them with MS Word and copy/paste
3. Open them with Openoffice Write and copy/pate
4. Open them with Firefox or Opera, copy-paste in Word or Write first, then re-copy and paste in TW

A little 'inside' info on why this happens:
TW uses RTF as its internal format. When you see a webpage, this is 'described' in html. So, in order to preserve the formatting when pasting to TW someone has to convert from html to rtf. This is a very complicated process (this is why TW cannot do it itself, firefox cannot do it either - so TW is excused :))
But MS products can. So, when you copy from Internet Explorer, automatically this text is converted to RTF (and other formats), ready to be pasted to applications that ask for it (with paste). Firefox does not do this.

Why does the trick with the intermediate copy in MS Word or Openoffice works?
Both these products have their own html-to-rtf converters. When you paste html text from IE or Firefox in MS Word or OO-Write, there is no conversion taking place (because both MS Word and OO-Write know html). If you then select this text from there and re-copy it, you are actually using the html-to-rtf converters of these programs (MS Word or OO-Write), which seem to handle some things better!

This 2-step procedure can even be used with Firefox. Since firefox does not have an html-to-rtf converter, if you copy a page into MS Word or OO-Write first, and then re-copy and paste in TW, the formatting will be preserved.

I hope the above is not too technical.

Just for a note: TW may utilize the MS Word converter automatically in the future (if it find MS Word installed), so as to be able to copy directly from Firefox: but since, for now, there is a very easy workaround, i leave this for later,

Costas
aaron
Posts: 204
Joined: Fri Jun 01, 2007 11:04 pm
Location: Dallas, Texas
Contact:

Post by aaron »

Here's an add-on for FireFox that embeds an Internet Explorer tab.

https://addons.mozilla.org/en-US/firefox/addon/1419
Post Reply