Pasting Rich Text from Firefox produces only Plain Text

General comments and questions. Technical support.
Post Reply
AJSchmidt
Posts: 4
Joined: Thu Dec 19, 2013 6:12 pm

Pasting Rich Text from Firefox produces only Plain Text

Post by AJSchmidt »

Whenever I'm using the Firefox browser to copy some formatted text or graphic image content, pasting that into Atlantis produces only the plain text portion of the content. All font formatting, hyperlinks and images are lost.

Copy/Pasting rich content from Internet Explorer into Atlantis works very well.

Pasting Firefox or Internet Explorer content into Microsoft Word reproduces all of the formatted text and graphic images. And if I then copy that content from Word and paste into Atlantis, it's all there too.

I have searched the forum and tried without success the remedies mentioned in: http://www.atlantiswordprocessor.com/en ... php?t=1777

My system is Atlantis v1.6.6.1 running on Windows 8 (64-bit), IE10, Firefox 26, Microsoft Office 2010, ESET Smart Security. Microsoft's Windows Defender reports that it is turned off and not monitoring this computer. ESET is not set to specifically screen out any Atlantis activities.

I tried the GetOpenClipboardWindow.exe utility and it reported no problems.

Sometimes this problem behavior serves as a great way to filter out all hidden web formatting, but most of the time when I want to reproduce the text formatting and embedded image content from the webpage, this bug is undesirable. Is there some way to turn this filtering of Firefox-only content on/off in Atlantis?
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi,
I can answer this question with certainty. I copy/paste excerpts from Web pages routinely, daily, into Atlantis. And most of the time, the original formatting is retained.

The problem that you have has 2 causes:
1. Atlantis does not currently support the HTML Windows Clipboard format. Atlantis only supports the RTF Windows Clipboard format (plus the pure text version of course).
2. Firefox or any other alternative browsers have no support for the RTF Windows Clipboard format. They automatically send any copied text to the Windows Clipboard in HTML or pure text format. Only Internet Explorer automatically sends any copied text to the Windows Clipboard in RTF format too.

So Atlantis only gets HTML from Firefox (which it cannot use), and pure text, which it does use.

Now you can still paste from Web pages into Atlantis and retain the original formatting. There are 3 solutions that I am aware of:

A. You copy/paste directly from Internet Explorer into Atlantis. The original formatting will be retained.
B. You first paste into Word, copy that pasting from Word, and paste again into Atlantis. This works because, like Internet Explorer, Word automatically sends any copied text to the Windows Clipboard in RTF format too.
C. You use, as I do, a Firefox Add-On that displays Web pages in Firefox through the Internet Explorer engine. This Add-On is called “Fire IE”. But there are others doing roughly the same job. You might want to test a few of them (that allow you to “switch rendering engine”). Note that switching the browser rendering engine can be done for each individual site, or for all sites. Sites can be registered so that they automatically display with the Internet Explorer engine. In this way, you have the best of both worlds: you keep the Firefox GUI, and you use the Internet Explorer engine.

HTH.
Cheers,
Robert
AJSchmidt
Posts: 4
Joined: Thu Dec 19, 2013 6:12 pm

Post by AJSchmidt »

Robert, thank you for confirming the behavior and suggesting the Firefox Add-on as a work-around.
After seeing your post, I found a related discussion from 2009 that implies this "feature" will continue to be part of Atlantis' DNA for a long time to come:
"Paste Special: HTML From Clipboard ---> RTF"
http://www.atlantiswordprocessor.com/en ... php?t=1240

I tried the "Fire IE" Add-on plus several others, and found that using the simple "Open in IE" one was very effective and more compatible with my system, although it doesn't synchronize cookies between the Firefox & IE sessions.


Best Regards,
Andrew
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Thanks for this thread. This seems to be an undocumented feature but important. I gave this a try and was pleased to see italic words from the web site being preserved which made me happy to avoid having to fix them all. However, some web sites have some stupid links that are in the text but actually point to offsite advertizing. These are also preserved in this scenario. Is there an easy way to get rid of them? I can right click the link text and then select hyperlinks/deactivate to remove them one by one by noticing them in the text, but I would prefer a search option. Is there some way to find them?

I did notice that if the very last word in the selected area was in italics it got missed in the paste. Not sure why.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Dale,
In Atlantis you can deactivate all the hyperlinks included in a selection if you right-click any of the hyperlinks in that selection, and choose “Hyperlink > Deactivate”. This is an obvious solution if you want to get rid of all the hyperlinks in the selection. However, things have to be done manually if you want to only preserve some of the hyperlinks.

Searching specifically for hyperlinks that point to offsite advertizing does not seem possible unless they contain some text that make them stand out from the legitimate URLs.

Now if I select text from IE11 or Firefox using the IE engine through the FireIE Add-On, and the last word (paragraph) is in italics, the italics are preserved if I copy/paste into Atlantis. I just tested this on the following page:

Polar vortex over US brings abnormally mild weather to Scandinavia

HTH.
Cheers,
Robert
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

thanks for the response. I will recheck the final italics on another sample. Perhaps it was just a fluke. I will use the select feature to remove a group of them. I typically don't mind removing them all as even the ones I want I have to regenerate if they are not referenced locally.

Dale
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

I have been using a IE paste for a while now and have run into almost as many problems as I was trying to fix. What I was trying to fix was capturing the italic words and this now works but I am experiencing all sort of formatting issues with the pasted file. All the paste go to normal style and then silently override that style with different font sizes, different indents, different spacing after the paragraphs etc but there is no indication of this except when I notice it visually. I have to inspect each paragraph to see what it happening. Among the ways I fix it is switching a paragraph to another style and then switching it back to normal to get the normal style settings to take.

Is there a better way? Is there a way to specify the paste to some style other than the default one? So then I can switch the style to normal in one step instead of two? I have a document now with normal styles I cannot trust.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Dale,
First, how do you do the pasting into Atlantis? Do you use “Ctrl+V”?
I am not sure I understand your aims in this game.
If, for example, you want the italics from the original text to be preserved, you cannot apply or reapply the Normal style to them. Your Normal style, like any “normal” style should not normally include the “italic” attribute in its “normal” properties. So applying the Normal style to a paragraph wholly formatted in italics will invariably remove the italics. Same thing with any paragraph properties from the original text: if you want them preserved, you should not apply or reapply the Normal style to them.

This said, in Atlantis, if you paste text whose formatting is different from the properties inherent in your Normal style, it will be pasted with its original formatting as far as possible.

It is only in MS Word that your Normal style might get automatically updated with (some of) the properties of the pasted text.

If this does not help, could you please post a Web URL where you copied text from, and the resulting document, explaining what you don’t like in the results.

Thanks in advance.
Robert
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Actually when I switch to a different format the italics and bolding are typically preserved through the change (there are not for the whole paragraph but for a word or two inside the paragraph). I am using Ctrl-V to paste the results of a Ctrl-C capture of multiple paragraphs. My basic problem is that I want to create an eBook and I am using Public Domain text but the rendering source is a web site with it own formatting. Pasting corrupts my Normal style for these paragraphs and I have to fix them right away to begin to understand what happens. The style is called normal but the text itself is not related at all to normal due to all the overrides present in the paste. At this point I have some Normal styles I can trust and some (the paste) that I cannot. Clearly attributes assigned to text inside the paragraph such as bold and italics are fine and work as expected but the overall paragraph styles are where the problem lies.

I understand there may not be a solution. I was hoping that there was something I could do to mitigate this issue such as having a way to assign a paragraph style to pastes that was not my normal base style that everything in the document is built on. Perhaps the answer is not use the default anywhere.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Dale,
I am not quite sure, but I think I now understand what exactly you want to preserve.
Please, bear with me. This is a bit overlong, but I am trying to be as clear as possible.

In MS Word, when you paste from a Web page, the pasted text gets pasted as a Normal-style text because it is sent that way by IE. But MS Word supports the HTML clipboard format. And when MS Word pastes the HTML clipboard contents, it overrides the font face associated with the pasted text.
Let’s take an example.
The text at Polar vortex over US brings abnormally mild weather to Scandinavia has “Times New Roman” associated with it in the page coding. If you paste that text as RTF into Word, you get it pasted as “Times New Roman” 12pts, which is the original coding. But if you paste as HTML (which is default in MS Word when it is available), that same text gets pasted as “Calibri” 11pts (which is the Normal style default in my version of MS Word). So if you paste the last paragraph of the above page into Word, you keep the original italics, but Word changes the original “Times New Roman” 12pts associated with it to the target Normal style font face and size, which is “Calibri” 11pts (on my system, again). So in a way, you get the best of both worlds.

Now as you know Atlantis does not yet support the HTML clipboard format. So in Atlantis you get what you’d get in MS Word by pasting as RTF: the copied text gets pasted as a Normal style text, but it overrides all the formatting inherent in the Normal style of the target document. So you might keep the bold and italic attributes of the original text, but you lose everything else that you might want to remain associated with your own “Normal” style.

But there is a workaround that you can use in Atlantis.

Let’s take an example again.
Suppose that the Normal style in your target document (and maybe in most of your documents) has these characteristics: “font: Arial; font size: 11 pt; justified alignment; widow/orphan control; spacing before: 5 pt; spacing after: 5 pt”

If you copy the last line (paragraph) from the above Web page (i.e. “Additional reporting by Ben McPherson in Oslo”) and paste it into Atlantis, it gets pasted with the original italic formatting, but it also gets pasted with the original “Times New Roman” 12pts as some “Normal” style.

As I understand things, you don’t want the font face and size of your Normal style to be changed in that way. I assume you want to keep the “normal” font face and size of your own “Normal” style. In our example, it will be “font: Arial; font size: 11 pt; justified alignment; widow/orphan control; spacing before: 5 pt; spacing after: 5 pt”. Here is what you can do about this. It might sound lonng and convoluted, but it is actually fairly easy, and you’ll have to do it only once.

1. Press “Enter” to create a new empty paragraph. Apply the Normal style to it. Select this paragraph.
2. Display the Control Board Format Palette and click on the bottom toolbar to “Pick new format from document”:

Image

3. Click on the document selection (empty Normal paragraph) with the special mouse pointer (format picker).
4. Atlantis will automatically create a new Format in your Format Palette. It will be named “Format 1” by default.
5. Click on the Control Board Format Palette bottom toolbar to “Edit properties of highlighted format”:

Image

6. Choose “Name…” first from the pop-up menu. Give this new Format any appropriate name, like “Paste_Control”, for example.
7. Again, click on the Control Board Format Palette bottom toolbar to “Edit properties of highlighted format”. Choose “Font…” from the pop-up menu this time. In the Font Format dialog, right-click the “Font Color”, “Highlight”, “Underline style”, and “Underline color” successively and left-click the pop-up command to put each of these Font properties in their “undefined state”:

Image

8. Still in the same Font Format dialog, click each of the Font “Effects” so that they all end up looking like this, i.e. also in their “undefined state”:

Image

9. Of course, OK out of the Font Format dialog to validate your changes.
10. Again, click on the Control Board Format Palette bottom toolbar to “Edit properties of highlighted format”. Choose “Paragraph…” from the pop-up menu this time. In the Paragraph Format dialog, specify all the properties that you want Atlantis to apply as part of your “Normal” paste control. In our example, it would look in this way (but, of course, you can choose any other “default properties” for your Format template):

Image

10. Again, OK out of the Paragraph Format dialog to validate your changes.
11. You might also want to assign a Hot Key to this new Format template. Again, click on the Control Board Format Palette bottom toolbar to “Edit properties of highlighted format”. Choose “Hot Key…” from the pop-up menu this time. Enter any suitable hot key and OK out of the dialog.

Now that we have a custom-made Format template, let’s see what happens when we apply it to text pasted from the Web.

Let’s suppose again that we copy the last line (paragraph) from the above Web page (i.e. “Additional reporting by Ben McPherson in Oslo”) and paste it into Atlantis. It gets pasted with the original italic formatting, but it also gets pasted with the original “Times New Roman” 12pts as some “Normal” style:

Image

Now if we select the pasted text, and apply the “Paste_Control” Format template to it, we get this:

Image

This is in italics like the original text, but the pasted text is now formatted as specified in the Atlantis Format template, i.e. “font: Arial; font size: 11 pt; justified alignment; widow/orphan control; spacing before: 5 pt; spacing after: 5 pt”.

How’s that?

HTH.
Cheers,
Robert
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Thanks, I will give this a try but on the surface it looks like it will solve my problem.

By the way, is there any way to tell if a paragraph marked normal or any of the other styles actually what it says? i.e. it has not been changed from what it should be? It would be very nice to be able to look at the format name in the window and know that it is unmodified in any way.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

The Style name on the toolbars, the Control Board Styles panel, or anywhere else, shows which style the current paragraph is associated with. But the current paragraph might very well have been reformatted manually in a very different way, partially or even wholly. So looking at the Style name (or even properties) does not say much, except that the current paragraph was originally intended to look in such and such a way. This is why it is generally recommended to use style overrides very sparingly. Style overrides muddle up the original design, and don’t facilitate document maintenance.

On the other hand, there is an easy way to get rid of font overrides: you only need to select a fragment of text and press “Ctrl+Space”. This resets the font format to what is inherent in the associated paragraph style. And there is a similar way to reset a whole paragraph to the properties of its associated style: simply press “Ctrl+Q”.
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

I am not seeing this behavior. When I select a fragment and Control-space it only changes the font of the fragment I have selected and when I use Control-Q it does change quite a bit but not the font size. However the menu item - "Style > apply" does do the trick of resetting the style.

It would be a nice enhancement to include an indication of paragraph overrides in the Style box when they are present. Perhaps adding an * or a + to the end of the name would be a flag that the user that that particular paragraph had overrides present. Word does tell you about overrides with a more complicated method but a simple symbol would be a big help.

The ctrl-space command does help a lot if I select the whole paragraph or even a large group of paragraphs.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

Hi Dale,
I am not seeing this behavior. When I select a fragment and Control-space it only changes the font of the fragment I have selected … The ctrl-space command does help a lot if I select the whole paragraph or even a large group of paragraphs.
The Font Format properties are associated with each character individually. “Ctrl+Space” will only reset the current selection of characters.
“Ctrl+Q” behaves differently because it resets the paragraph properties, which by definition cover the whole paragraph.
“Ctrl+Space” and “Ctrl+Q” reset things absolutely, completely. They get rid of all manual overrides.
However the menu item - "Style > apply" does do the trick of resetting the style.
Resetting the style is a gentler method. Resetting the style keeps all manual overrides that don’t contradict the properties inherent in the style being applied. By the way, you have the same command on the Control Board Styles panel (“Apply style to document selection” on the bottom toolbar).
Note that in Atlantis, if you (re)apply a style to a selection, the manual overrides will be kept, except in two circumstances:
1. When the manual overrides present in the current paragraph or selection contradict the properties inherent in the style being applied. For example, if you (re)apply a style which says “no italics” to a paragraph where some of the characters have been italicized, these characters will lose their italic property.
2. When the manual overrides present in the current paragraph cover the whole paragraph. For example, if you (re)apply a style which says nothing special about the Italic attribute (the so-called “Undefined State”) to a paragraph wholly formatted in italics, that paragraph will lose its italic formatting. To keep such overall formatting, you need to associate the paragraph with a dedicated style (an “italics” style in this example).
It would be a nice enhancement to include an indication of paragraph overrides in the Style box when they are present. Perhaps adding an * or a + to the end of the name would be a flag that the user that that particular paragraph had overrides present.
Yes, this would be very helpful. If Atlantis could show which properties are concerned by the overrides, it would be even more helpful. This is a suggestion for the developers.

Now I have given some more thought to this. I have found a makeshift solution. It is rather convoluted, so please bear with me.
Is there any way to tell if a paragraph marked normal or any of the other styles actually what it says? i.e. it has not been changed from what it should be?
I assume that you have a document where some of the paragraphs associated with the “Normal” style have manual overrides. And you want to determine which paragraphs have these manual overrides.

1. Press “Enter” to create a new empty paragraph. Apply the “Normal” style to it. Select this paragraph, and keep it selected.
2. Press “Ctrl+D”, then the “Copy” button in the “Font Format” dialog:

Image

3. Close the “Font Format” dialog.
4. Press “Ctrl+Shift+G”, then the “Copy” button in the “Paragraph Format” dialog:

Image

5. Close the “Paragraph Format” dialog.
6. Press “Ctrl+Home” to place the insertion cursor at the start of the document.
7. Press “Ctrl+F”. In the “Find / Replace” dialog, clear the “Find What” box, then check the “Format” box, and click the Font Format button:

Image

9. In the “Font Format” dialog, press the “Paste” button:

Image

10. OK out of that “Font Format” dialog.
11. Still in the “Find / Replace” dialog, click the Paragraph Format button:

Image

12. In the “Paragraph Format” dialog, press the “Paste” button:

Image

13. OK out of that “Paragraph Format” dialog.
14. Still in the “Find / Replace” dialog, press the “Find & Select All” button:

Image

15. Keep the selection on, then (for example) apply a double wavy underline to the selected fragments:

Image

All the paragraphs with wavy underline are the paragraphs having font and paragraph properties identical to the properties inherent in the “Normal” style.

16. Display the Control Board Styles panel, select the “Normal” style in the list, then click “Select paragraphs associated with highlighted style” on the panel bottom toolbar.

17. Apply some highlighting color to the selection, let’s say “Light Green”.

All the paragraphs with Light Green highlighting are the paragraphs associated with the “Normal” style. All the paragraphs with Light Green highlighting and double wavy underline are the paragraphs which are truly and wholly “Normal-style” paragraphs. All the paragraphs with Light Green highlighting and no double wavy underline are the paragraphs which are associated with the “Normal” style but have manual overrides.

Finally, a trick that you might find helpful. Suppose that you have a document with plenty of manual overrides and only one style, the “Normal” style, as often happens unfortunately. You don’t want to go over each of these overrides separately. But you want to correct a few obvious things. You notice, for example, that some paragraphs have a font size of 10pts, others 11 pts, others 13pts for no apparent reason. You want to reset the font size to the “Normal” font size. Simply use the Control Board Styles panel to “Select paragraphs associated with highlighted style”. And use the Atlantis formatting toolbar to apply the appropriate font size to the selection. Let’s take another example. Let’s suppose that you have noticed that some paragraphs have spacing before/after 10pts, other paragraphs have spacing before/after 0pts, others still have spacing before/after 12pts. This does not look right to you. You want the same paragraph spacing before/after for all the paragraphs associated with that style. Again, use the Control Board Styles panel to “Select paragraphs associated with highlighted style”. And use the Atlantis “Format | Paragraph…” dialog to apply the appropriate Paragraph properties to the selection.
You can use this trick with any font or paragraph attributes that you want to apply to all the paragraphs associated with a style. In this way, you won’t reset anything that you don’t want to reset, or that you did not anticipate would be reset by (re)applying a style.
This is non-styled formatting but it might save your life if you have a deadline.

HTH.
Cheers,
Robert
DaleDe
Posts: 84
Joined: Thu May 02, 2013 7:28 pm
Location: Grass Valley, CA, USA
Contact:

Post by DaleDe »

Great stuff, thanks for the info. How is it you know so much neat stuff about Atlantis? I had thought you might be a developer but evidently not based on your comment.

Dale
Robert
Posts: 1906
Joined: Fri Aug 15, 2003 8:27 pm

Post by Robert »

All Atlantis users are participating in the development of Atlantis, one way or the other, when they buy a license, send bug reports, make feature requests, post questions or suggest solutions on the forum. I am one of them. Maybe I am among the oldest and most dedicated end-users, but I can only make suggestions and request features like anybody else. I am not the decision maker. “Admin” is.

Cheers,
Robert
Post Reply