Make WordPress Core

Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#28612 closed enhancement (fixed)

Paste as Text Modal Should be Dismiss-able

Reported by: ericmann's profile ericmann Owned by: azaozz's profile azaozz
Milestone: 4.5 Priority: normal
Severity: normal Version: 3.9
Component: TinyMCE Keywords: has-patch
Focuses: ui Cc:


Currently, the paste-as-text warning modal displays every time the button is clicked. This includes both on every new post and every time a post draft is saved before the button is clicked again.

While useful for explaining the way the feature works, this modal is distracting and an annoying interruption to many editorial workflows. Instead of displaying the modal all the time for every user, we should allow the modal to be dismissed on a per user basis.

Perhaps a link like "I know, stop reminding me" at the bottom of the warning that stores a flag in user meta to prevent prompting the editor again.

Attachments (2)

28612.patch (961 bytes) - added by azaozz 8 years ago.
28612.1.patch (982 bytes) - added by azaozz 8 years ago.
Tweaked the patch a bit.

Download all attachments as: .zip

Change History (12)

#1 follow-up: @iseulde
10 years ago

  • Component changed from Editor to TinyMCE
  • Focuses administration removed
  • Version changed from 3.9.1 to 3.9

I agree, but it's not simple to change this unless we modify the TinyMCE paste plugin. We could dismiss it automatically per user (by clicking "OK"). That can be done without changing the plugin. But we can't add an extra button.

#2 in reply to: ↑ 1 @ericmann
10 years ago

  • Keywords needs-patch added

Replying to avryl:

I agree, but it's not simple to change this unless we modify the TinyMCE paste plugin.

Actually no, it would be simple. The string that prints to the page is passed through wp_localize_script(). A very simple option would be to add an anchor tag with a class to the localized text and use editor JS to capture events on that tag. No modifications to the TinyMCE plugin required.

We could dismiss it automatically per user (by clicking "OK").

That would be a fair compromise.

we can't add an extra button.

Wasn't just requesting an extra button, just a way to get rid of the modal nag. Auto-dismissing on OK clicks would be fine. Injecting a control into the modal the same way we inject the reference to MS Word would be acceptable as well.

#3 @iseulde
9 years ago

  • Milestone changed from Awaiting Review to Future Release

#4 @azaozz
9 years ago

How about we save something in sessionStorage? That will act like a cookie but will go away as soon as the user closes the current window. Then the warning will be shown a lot less often. This will be a significant improvement.

#5 @iseulde
8 years ago

#35639 was marked as a duplicate.

8 years ago

#6 @azaozz
8 years ago

  • Keywords has-patch added; needs-patch removed

Controlling whether to show that warning was made possible in TinyMCE 4.3.6 (as of today).

In 28612.patch: show the warning twice, then don't ever show it again (on the same site for that user). Think we should show it twice so new users don't miss it and get confused.

Last edited 8 years ago by azaozz (previous) (diff)

8 years ago

Tweaked the patch a bit.

This ticket was mentioned in Slack in #core by azaozz. View the logs.

8 years ago

#8 in reply to: ↑ 7 @adamsilverstein
8 years ago

This seems like a worthwhile enhancement, and seems small enough to consider for inclusion in 4.5.

#9 @azaozz
8 years ago

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

In 36807:

TinyMCE: then toggling the paste in plain text mode disable the warning message after the second time.

Fixes #28612.

#10 @azaozz
8 years ago

  • Milestone changed from Future Release to 4.5
Note: See TracTickets for help on using tickets.