Skip to content

Latest commit

 

History

History
121 lines (78 loc) · 4.56 KB

File metadata and controls

121 lines (78 loc) · 4.56 KB

Export plugin

Important
The Export plugin is now deprecated and will be permanently removed in the upcoming {productname} 9.0 release. To ensure continued access to similar functionality, consider using the Export to PDF Premium plugin as an alternative.

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.

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) and select PDF.

liveDemo::export[]

Cloud Installation

The Export plugin is provided with all subscriptions to {cloudname}, 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

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 or export_image_proxy_service_url options as required.

Basic self-hosted setup

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)

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 or 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:

Commands

The Export plugin provides the following {productname} commands.

Events

The Export plugin provides the following events.

APIs

The Export plugin provides the following APIs.