Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34713 closed defect (bug) (worksforme)

TinyMCE paste options are ignored when 'teeny' is enabled in wp_editor.

Reported by: jonkoops's profile jonkoops Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Editor Keywords:
Focuses: administration Cc:


When using wp_editor with the teeny option enabled some paste related options for TinyMCE stop working. One of these options is paste_remove_styles, which will not remove styles with the teeny option enabled.



wp_editor('', 'some_field', [
  'teeny' => true,
  'tinymce' => [
    'paste_remove_styles' => true

Expected result

Styled content pasted from a website or Word document into the editor should have it's styling removed.

Actual result

The styling of the pasted content is retained.

Tested in Google Chrome version 46.0.2490.86 (64-bit) on Mac OS X El Capitan version 10.11.1

Change History (1)

#1 @azaozz
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Hi @jonkoops, thanks for the report.

If you look at the HTML source or in the browser console, you'll see that paste_remove_styles is passed to TinyMCE. The problem is that this option is for the paste plugin, and that plugin is not loaded by default when 'teeny' => true. You can use the teeny_mce_plugins filter to add 'paste', or you can pass all plugins that you want to load in the settings array.

Note: See TracTickets for help on using tickets.