Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

When I copy text from Google Docs and paste it in the OSX Text Edit application, format and links are preserved. If I copy it into a simple text app, the format is not preserved, but the text is pasted perfectly, as expected.

I assume there is some standard format in which the contents are copied in the clipboard, but what is it?

Thanks.

share|improve this question

2 Answers 2

Basically, Google Docs writes several representations of the data to the pasteboard (that's what it is called in OS X). Then whatever app you paste into reads an appropriate representation of the data from the pasteboard.

From the Pasteboard Programming Guide:

Pasteboard operations are often carried out between two different applications. Neither application has knowledge about the other and the kinds of data each can handle. To maximize the potential for sharing, a pasteboard can hold multiple representations of the same pasteboard item. [...] An item that is added to a pasteboard specifies what representations it is able to provide.

A pasteboard reader must find the data type that best suits its capabilities (if any). Typically, this means selecting the richest type available. [...] a rich text editor might provide RTFD, RTF, and NSString representations of copied data. An application that supports rich text but without images should retrieve the RTF representation; an application that only supports plain text should retrieve the NSString object, whereas an image-editing application might not be able to use the text at all.

The clipboard in Windows works basically the same way.

share|improve this answer

I wouldn't think this is a result of what Google docs "standard format" is. The format will be whatever font/size you have it set to in Google docs. Rather, your results are a decided by the program you are pasting it into. A simple text app (like notepad) only has one format and does not support links.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.