Skip to content

Latest commit

 

History

History
75 lines (45 loc) · 2.75 KB

File metadata and controls

75 lines (45 loc) · 2.75 KB

Paste plugin

Note
Looking for more advanced Microsoft Word importing and pasting? Try the PowerPaste plugin.

This plugin will filter/cleanup content pasted from Microsoft Word. The power of the plugin is in its options, so please take the time to learn more about them below.

The plugin also adds a menu item Paste as text under the Edit menu dropdown and a toolbar button.

Note
The toolbar button won’t work in browsers that don’t support direct access to the clipboard. In such cases the user will be presented with a modal/dialog box advising them of this along with a reminder of standard keyboard shortcuts.

Basic setup

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  plugins: 'paste',
  menubar: 'edit',
  toolbar: 'paste pastetext'
});

Options

These settings affect the way content is eliminated or preserved when being pasted. In addition, callbacks are available prior to and after content filtration.

Commands

The Paste plugin provides the following JavaScript command.