> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/knowledge-base/075-how-to-paste-formatted-content-into-overleaf.md).

# How to paste formatted content into Overleaf

*Please note: pasting formatted content is a new feature, and we are continually making improvements to ensure it works well in a range of scenarios. We’d also love your feedback on it, which you can provide in* [*this survey*](https://docs.google.com/forms/d/e/1FAIpQLSc7WcHrwz9fnCkUP5hXyvkG3LkSYZiR3lVJWZ0o6uqNQYrV7Q/viewform)*.*

You can paste formatted content, including [tables](#pasting-tables-into-your-overleaf-project), [images](#pasting-images-into-your-overleaf-project), [styled text](#pasting-styled-text-into-your-overleaf-project), and [lists](#pasting-lists-into-your-overleaf-project) into our **Visual Editor** and retain the formatting using Ctrl+V (on Windows/Linux) or Cmd+V (on MacOS).

Your pasted content will appear formatted in **Visual Editor** while in **Code Editor** you’ll be able to see the LaTeX code Overleaf has generated for you. (Don’t try pasting formatted text into **Code Editor** though!)

You can paste into **Visual Editor** from various sources, including Google Docs, [Microsoft 365](https://www.microsoft.com/en-us/microsoft-365) (formerly Microsoft Office), [LibreOffice](https://www.libreoffice.org/), and websites. Pasting formatted content from PDF documents is not currently supported. For optimal results with Microsoft’s tools, use the online versions, though the desktop applications are also supported.

After pasting formatted content into **Visual Editor**, you’ll see a drop-down menu that lets you change the pasted (formatted) content back to plain text (without formatting):

![Image showing menu presented when formatted text is pasted into Overleaf"](/files/bS4QGAdjuhcwyLKil3z1)

* **Paste without formatting** converts formatted text to plain text.
* **Paste with formatting** switches back to formatted text.

## Pasting plain text

You can paste *unformatted plain text* into **Visual Editor** or **Code Editor** by using the following key combinations:

* Windows/Linux: Ctrl+Shift+V
* MacOS: Cmd+Shift+V

## Required LaTeX packages

To support pasting images and other content into Overleaf you need to add the following packages to your [LaTeX document preamble](/latex/latex-basics/01-learn-latex-in-30-minutes.md#the-preamble-of-a-document):

* [`hyperref`](https://ctan.org/pkg/hyperref?lang=en): to support [hyperlinks](/latex/document-structure/09-hyperlinks.md) contained in pasted content.
* [`graphicx`](https://ctan.org/pkg/graphicx): provides the [`\includegraphics` command](/latex/latex-basics/01-learn-latex-in-30-minutes.md#adding-images) required to use graphics pasted into your project.

## Pasting tables into your Overleaf project

**Visual Editor** can’t fully preserve the form and style of every table pasted into your project, but you can still save time and effort by pasting a wide range of tables created in other applications.

**Visual Editor** tries to preserve and preview the following table elements:

* horizontally merged cells (spanning multiple columns)
* borders applied to cells
* formatting of text within table cells
* table captions and headings

**Visual Editor** also lets you [modify the pasted table](/latex/knowledge-base/067-how-to-generate-and-insert-latex-tables-in-overleaf.md#editable), such as editing cell contents or adding rows and columns. You can also switch to **Code Editor** to make changes, including setting LaTeX parameters that control the table’s [position within the typeset document](https://learn.overleaf.com/learn/Inserting_Images#Positioning).

### An example of pasting a table

The following video demonstrates pasting a table from Wikipedia—note how hyperlinks and text styling are preserved.

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/2ENPw4QceCpzglQafnkFWU/f7be441c53822a37aa9d9d192fd43410/PastedTable.mp4>" %}

## Pasting images into your Overleaf project

You can paste single images into **Visual Editor** and **Code Editor** (but only **Visual Editor** provides an image preview). [Pasting multiple images](#can-i-paste-multiple-images) is not currently supported.

![Image showing the Upload from computer modal window](/files/gAd3CLW6pD1UOgueTqG9)

You can:

* Name the file used to save the pasted image.
* Choose the project folder in which to save it.
* Decide whether to use a figure caption.
* Decide whether to include a label (used for referencing the table).
* Configure the image width (as a fraction of `\linewidth`).

Any image you paste is saved as a .png file in your Overleaf project. It's then incorporated into your document using automatically generated LaTeX code. **Visual Editor** will provide a preview of the pasted image but **Code Editor** will display the LaTeX code only.

### An example of pasting an image

Images can be copied from many sources, including web pages, but this video clip demonstrates copying an image from [gimp](https://www.gimp.org/) and pasting it into **Visual Editor**. Note the use of **Code Editor** to set a custom image width of `0.85\linewidth`.

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/3v01l6iGqXyAD4zaSosGbN/be53d9dad5fa4cb95b8177ec69c01cf3/PastingAnImage.mp4>" %}

The image used in the video demonstration was copied from a [Wikipedia article on population density](https://en.wikipedia.org/wiki/World_population#/media/File:Population_Density,_v4.11,_2020_\(48009093621\).jpg).

## Pasting styled text into your Overleaf project

To retain formatting of the items listed below, paste them into Overleaf’s **Visual Editor** using Ctrl+V (on Windows/Linux) or Cmd+V (on MacOS):

* Headings
* **Bold text**
* *Italic text*
* [Hyperlinks](http://www.google.com)
* Code blocks (e.g. wrapped in `tags in HTML)`
* `Symbols e.g., &, %, …, $50.00`

` An example of pasting formatted textThe next video clip demonstrates pasting formatted text copied from a Google Doc.Pasting lists into your Overleaf projectBulleted and numbered lists can be pasted into Overleaf’s`` `` `**`Visual Editor`**` `` ``using Ctrl+V (on Windows/Linux) or Cmd+V (on MacOS).An example of pasting a listThe next video clip demonstrates pasting a multi-level bulleted and numbered list copied from a browser page and a LibreWriter document. Note how the bold and italic text is also preserved.Description listsVisual Editor also supports creating and editing description lists.FAQs about pasting formatted contentCan I use drag and drop? `**`Visual Editor`**` ``supports using drag and drop to upload .png, .jpg or .pdf format images, but not for adding formatted content, which must be pasted.Can I paste multiple images?It’s not currently possible to paste multiple images simultaneously into`` `**`Visual Editor`**` ``or`` `**`Code Editor`**`. If you paste content that contains multiple images, only the text component will be pasted. The images must be pasted individually, which has the advantage of allowing you to configure each one separately.`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/knowledge-base/075-how-to-paste-formatted-content-into-overleaf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
