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: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3.1 |
Component: | Editor | Keywords: | |
Focuses: | administration | Cc: |
Description
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.
Code
<?php 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)
Note: See
TracTickets for help on using
tickets.
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 thepaste
plugin, and that plugin is not loaded by default when'teeny' => true
. You can use theteeny_mce_plugins
filter to add 'paste', or you can pass all plugins that you want to load in the settings array.