Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28067 closed defect (bug) (fixed)

TinyMCE editor strips this: style="foo" while pasting

Reported by: billyobito's profile billyobito Owned by: azaozz's profile azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords:
Focuses: Cc:



I'm facing a very simple and easy to test problem, which I'm pretty sure is a bug. Every time I try to past a text that contains a style attribute, Wordpress editor strips it. So for example, if you try to paste the following text:

foo style="bar" foo

... only the following will show up in the editor:

foo foo

Also, this only happens if I use 'Ctrl+V' to paste, if I right click and the choose 'Paste' then it works fine.

Also, I've tested this with multiple themes and it's the same problem in all of them.

Please let me know if this is indeed a bug, and what can be done about it.

Thank you.

Change History (11)

#1 @iseulde
10 years ago

Thanks for the report. What kind of styles are you trying to paste? As far as I know, only color, font-style and font-weight are preserved.

#2 @iseulde
10 years ago

  • Keywords reporter-feedback added

#3 @iseulde
10 years ago

  • Focuses ui accessibility removed

#4 @SergeyBiryukov
10 years ago

Reproduced in Chrome. Related: #21157.

#5 @iseulde
10 years ago

  • Keywords reporter-feedback removed

Sorry, I misunderstood the problem. I can reproduce this in trunk, but not in TinyMCE 4.0.25, so this is either fixed in the latest TinyMCE version or WordPress causing it.

#6 @billyobito
10 years ago


Sorry didn't reply sooner, hadn't checked my email in a while. Anyway, I should have mentioned that I am having this problem while using Chrome version 34.0.1847.131 m. The other browser I tested this was in Firefox, in which it's working fine.

Please let me know if you need any other info.

Thank you.

#7 @ocean90
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.9.2

Reproduced in Chrome in current trunk, but not with

Applied also the patch from #28016 which doesn't fix the issue.

#8 @alexander.rohmann
10 years ago

This was a TinyMCE bug that's been fixed as of 4.0.26

Pulling in the latest version of the paste plugin should address this. This was done three weeks ago ( so it looks like that bug fix was missed by a couple days.

#9 @azaozz
10 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 28568:

TinyMCE: update to 4.0.26. Includes fixes for the 'paste' plugin (paste from Word/Excel, paste in WebKit/Blink), show/hide/isHidden in inline mode, drag/drop in tables and in Safari, and others. Fixes #28342, #28016, #28250 and #28067

#10 @SergeyBiryukov
10 years ago

  • Keywords fixed-major added; needs-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

#11 @azaozz
10 years ago

  • Keywords fixed-major removed
  • Milestone changed from 3.9.2 to 4.0
  • Resolution set to fixed
  • Status changed from reopened to closed

No point to update to an "interim" version. WordPress 4.0 includes the latest TinyMCE and will be out soon.

Note: See TracTickets for help on using tickets.