WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#28016 closed defect (bug) (fixed)

Update the 'paste' TinyMCE plugin

Reported by: azaozz Owned by: azaozz
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: Cc:

Description

TinyMCE 4.0.23 was just released and includes some fixes for the paste plugin:

Attachments (1)

28016.patch (28.1 KB) - added by azaozz 6 years ago.

Download all attachments as: .zip

Change History (11)

@azaozz
6 years ago

#1 @azaozz
6 years ago

  • Keywords has-patch needs-testing added

With the WebKit improvement we can go back to stripping all inline styles as in 3.8.

Alternatively we can keep only 'color' by setting 'paste_webkit_styles' => 'color'. In that case most of the pasted content will have inline styles that can be removed by selecting the content and clicking the "Clear formatting" button.

#2 @netweb
6 years ago

Testing 28016.patch:

I don't have a Mac (yet) so I can't test any of the 'Webkit' issues :(

  • 'Footnotes' and 'Endnotes' work as expected from Word 2013 to WP 3.9
    • (Note: 'Footnotes' and 'Endnotes' are not hyperlinked, future iteration may implement this)
  • Font colors only work using IE11, do not work with Google Chrome 34, Chrome Canary 36 or Firefox 29

MS Word 2013 HTML Clipboard Source:

<!--StartFragment-->

<p class=MsoNormal><span style='color:red'>Red text<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#0070C0'>Blue text<o:p></o:p></span></p>

<p class=MsoNormal>Normal text<o:p></o:p></p>

<!--EndFragment-->

IE: WP 3.9 'post' source after pasting from Word 2013

<p style="margin: 0cm 0cm 8pt;"><span style="color: red;"><span style="font-family: Calibri;">Red text</span></span></p>
<p style="margin: 0cm 0cm 8pt;"><span style="color: #0070c0;"><span style="font-family: Calibri;">Blue text</span></span></p>
<p style="margin: 0cm 0cm 8pt;"><span style="color: #000000; font-family: Calibri;">Normal text</span></p>
<p style="margin: 0cm 0cm 8pt;"><span style="color: #000000; font-family: Calibri;"> </span></p>
<p style="margin: 0cm 0cm 8pt;"><span style="color: #000000; font-family: Calibri;"> </span></p>

Firefox: WP 3.9 'post' source after pasting from Word 2013

Red text

Blue text

Normal text

Chrome: WP 3.9 'post' source after pasting from Word 2013

Red text

Blue text

Normal text

#3 @alleynoah
6 years ago

I'm not really familiar with the other issue described here, but can confirm that after pulling the latest from trunk and applying 28016.patch (and forcing it to load paste.min instead of the archive), the issue with footnotes and endnotes is resolved for both of my test documents (the crafted sample and client real-world sample). Thanks!

#4 @alleynoah
6 years ago

Is there a reference I can use to learn more about the other issue described here, and what would be helpful for me to test and report about? I'd love to help get this patch approved and merged!

#5 @ocean90
6 years ago

#28087 was marked as a duplicate.

#6 @ocean90
6 years ago

Related: #28067

#7 @azaozz
6 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

#8 @SergeyBiryukov
6 years ago

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

#9 @azaozz
6 years ago

In 28932:

TinyMCE:

See #28016

#10 @azaozz
6 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 in updating to an "interim" version. WordPress 4.0 includes TinyMCE 4.1+ and will be out soon.

Note: See TracTickets for help on using tickets.