---
title: "Export plugin"
description: "Export content from TinyMCE, into various formats."
canonical_url: "https://www.tiny.cloud/docs/tinymce/latest/exportpdf/"
md_url: "https://www.tiny.cloud/docs/tinymce/6/export/index.md"
version: "6"
last_updated: "2026-06-15T08:51:58Z"
tokens: 2246
---
Important This page documents TinyMCE 6. For new projects, Tiny recommends using the latest, most up-to-date version. [See TinyMCE 8 documentation](../../latest/exportpdf/).
# Export plugin

> **Important:** The Export plugin is now **deprecated** and will be permanently removed in the upcoming TinyMCE 9.0 release. To ensure continued access to similar functionality, consider using the [Export to PDF](/docs/tinymce/latest/exportpdf/) Premium plugin as an alternative.

> **Note:** This plugin is only available for [paid TinyMCE subscriptions](/pricing/).
The Export plugin adds the ability to export content from the editor to a user’s local machine in various formats. For a list of available exporters and information on what they support, see the [Exporters section](#exporters).

## Interactive example

To export the editor content, either:

- From the *File* menu, click *Export* and select *PDF*.
- Click the Export toolbar button (

![Export icon: A page with an arrow from the center of the page to the right of the page](../_images/icons/export.svg)
) and select *PDF*.
**Example**

```js
tinymce.init({
  selector: 'textarea#export',
  plugins: 'export pagebreak code emoticons image table lists advlist checklist link charmap directionality',
  toolbar: 'export pagebreak | blocks fontfamily fontsize | bold italic underline strikethrough | forecolor backcolor | subscript superscript | alignleft aligncenter alignright alignjustify indent outdent rtl ltr | bullist numlist checklist | emoticons image table link hr charmap',
  height: 500,
  content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
});
```

## Cloud Installation

The Export plugin is provided with all subscriptions to [Tiny Cloud](../editor-and-features/), including an automatically configured image proxy. To add the Export plugin to the editor, add `export` to the `plugins` option in the editor configuration.

### Basic setup using Tiny Cloud

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'export',
  toolbar: 'export'
});
```

## Self-hosted Installation

To add the Export plugin to the editor:

1. Add `export` to the `plugins` option in the editor configuration.
2. Enable the [`export_image_proxy`](#export_image_proxy) or [`export_image_proxy_service_url`](#export_image_proxy_service_url) options as required.

### Basic self-hosted setup

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'export',
  toolbar: 'export',
  export_image_proxy_service_url: 'http://example.com/imageproxy' // Required for rendering remote images
});
```

## Exporters

The Export plugin provides the following exporters:

- [Client-side PDF (`clientpdf`)](#client-side-pdf)

### Client-side PDF (`clientpdf`)

The client-side PDF exporter converts the editor content to a PDF without the need for server-side components. This exporter will resize the content to fit on A4 pages, add page breaks, take a snapshot of the HTML, and embed the snapshot image within the exported PDF.

This exporter has a few limitations or known issues that should be noted:

- The text content in the PDF cannot be selected or copied.
- A single line of content sliced horizontally and distributed across separate pages.
- Due to browser limitations, there is a limit on the number of pages that can be rendered. The number of pages varies between browsers.
- Remote images require an image proxy to render due to browser limitations. For information on proxying remote images, see the [export_image_proxy](#export_image_proxy) or [export_image_proxy_service_url](#export_image_proxy_service_url) options.
- Right-to-left languages that use cursive scripts (such as Arabic) may not render correctly due to an issue with how the image of the HTML content is rendered.

The following plugins are not supported:

- [Comments](../introduction-to-tiny-comments/)
- [Enhanced Media Embed](../introduction-to-mediaembed/)
- [Media](../media/)
- [Page Embed](../pageembed/)
- [Table of Contents](../tableofcontents/)
- [Footnotes](../footnotes/)

## Options

The following configuration options affect the behavior of the Export plugin.

### `export_cors_hosts`

The Export plugin cannot work with images from another domain due to security measures imposed by browsers on so called cross-origin HTTP requests. To overcome these constraints, Cross-Origin Resource Sharing (CORS) must be explicitly enabled on the specified domain(s) (for more information check [HTTP access control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)).

An array of supported domains for the images (with CORS enabled on them) can be supplied to TinyMCE via the `export_cors_hosts` option.

> **Note:** Each string in the array *must* be in the format of `example.com`. Do not include protocols (for example, `http://, https://`) or any trailing slashes in your domains.

> **Note:** `export_cors_hosts` is **not** required when enabling this plugin via [Tiny Cloud](../editor-and-features/).
**Type:** `Array`

**Default value:** `[]`

#### Example: `export_cors_hosts`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  toolbar: 'export',
  plugins: 'image export',
  export_cors_hosts: [ 'example.com', 'example.net' ]
});
```

### `export_ignore_elements`

This option takes an array of HTML element names and allows specific HTML elements to be excluded from the exported content. This can be used to exclude HTML elements that may cause issues with exported content, such as video or audio elements.

**Type:** `Array`

**Default value:** `[]`

#### Example: `export_ignore_elements`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'export',
  toolbar: 'export',
  export_ignore_elements: [ 'iframe', 'video', 'audio' ]
});
```

### `export_image_proxy`

This option can be used as a way of editing images across domains using a third-party local server-side proxy. A proxy is a script, that will retrieve a remote image and pipe it back to TinyMCE, as if it was an image hosted on the same domain.

> **Note:** `export_image_proxy` is **not** required when enabling this plugin via [Tiny Cloud](../editor-and-features/). If using the self-hosted Java proxy service provided as part of Paid TinyMCE subscriptions, use the [`export_image_proxy_service_url`](#export_image_proxy_service_url) option instead.
**Type:** `String`

#### Example: using `export_image_proxy`

```js
tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  toolbar: 'export',
  plugins: 'image export',
  export_image_proxy: 'proxy.php'
});
```

### `export_image_proxy_service_url`

This option configures the URL to the server-side proxy service which allows remote images hosted on different domains to be retrieved by the Export plugin. If a proxy is not configured, then remote images may not be able to be exported. Check the [Install Server-side Components](../introduction-to-premium-selfhosted-services/) guide for details on configuring the self-hosted Java proxy service.

> **Note:** `export_image_proxy_service_url` is **not** required when enabling this plugin via [Tiny Cloud](../editor-and-features/).
**Type:** `String`

#### Example: using `export_image_proxy_service_url`

```js
tinymce.init({
  selector: 'textarea',
  plugins: 'image export',
  export_image_proxy_service_url: 'http://example.com/ephox-image-proxy/'
});
```

## Toolbar buttons

The Export plugin provides the following toolbar buttons:

| Toolbar button identifier | Description |
| --- | --- |
| `export` | Downloads the content from the editor in the selected format. |

These toolbar buttons can be added to the editor using:

- The [`toolbar`](../toolbar-configuration-options/#toolbar) configuration option.
- The [`quickbars_insert_toolbar`](../quickbars/#quickbars_insert_toolbar) configuration option.
- [Custom Context toolbars](../contexttoolbar/).

## Menu items

The Export plugin provides the following menu items:

| Menu item identifier | [Default Menu Location](../menus-configuration-options/#example-the-tinymce-default-menu-items) | Description |
| --- | --- | --- |
| `export` | File | Downloads the content from the editor in the selected format. |

These menu items can be added to the editor using:

- The [`menu`](../menus-configuration-options/#menu) configuration option.
- The [`contextmenu`](../menus-configuration-options/#contextmenu) configuration option.
- [Custom Menu toolbar buttons](../custom-menu-toolbar-button/).

## Commands

The Export plugin provides the following TinyMCE commands.

| Command | Description |
| --- | --- |
| mceExportDownload | Converts the editor content using the specified exporter format and downloads the converted content. |

> **Note:** There are no settings available when using the 'clientpdf' format.
Examples
```js
tinymce.activeEditor.execCommand('mceExportDownload', false, {
  format: 'clientpdf',
  settings: {}
});
```

## Events

The Export plugin provides the following events.

The following event are provided by the [Export plugin](#).

| Name | Data | Description |
| --- | --- | --- |
| ExportPdf | N/A | Fired when the editor content is about to be exported as a PDF. |

## APIs

The Export plugin provides the following APIs.

| Name | Arguments | Description |
| --- | --- | --- |
| convert | format: string, settings: Object | Converts the editor content using the specified exporter format and returns a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that once resolved will contain the exported content. |
| download | format: string, settings: Object | Converts the editor content using the specified exporter format and downloads the converted content. |

> **Note:** There are no settings available when using the 'clientpdf' format.
Examples
```js
tinymce.activeEditor.plugins.export.convert('clientpdf', {});
tinymce.activeEditor.plugins.export.download('clientpdf', {});
```
