Skip to content

Latest commit

 

History

History
104 lines (66 loc) · 3.83 KB

File metadata and controls

104 lines (66 loc) · 3.83 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[]

Basic setup

To add the Export plugin to the editor, add export to the plugins option in the editor configuration.

For example:

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'export',
  toolbar: 'export',
  export_image_proxy: 'proxy.php' // 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 option.

  • 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 Checklist plugin icons will not render for Internet Explorer 11 users due to browser limitations.

The following plugins are not supported:

Commands

The Export plugin provides the following JavaScript commands.

Events

The Export plugin provides the following events.

APIs

The Export plugin provides the following APIs.