Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery: Is it quick to fix MSWord Paste into Body Text not working #456

Open
paregorios opened this issue Nov 18, 2022 · 5 comments
Open

Comments

@paregorios
Copy link
Member

paregorios commented Nov 18, 2022

The WYSIWYG editor for rich text fields has a button that's supposed to make pasting content from Microsoft Word safe by stripping all the evil. It doesn't work anymore. We need it to work.

@paregorios
Copy link
Member Author

paregorios commented Nov 18, 2022

Steps to reproduce

  1. Create a new (or edit an existing) Page.
  2. Switch focus to a Microsoft Word document, select and copy some text, and return to the browser window in which the "Add/Edit Page" form is displayed.
  3. On the Add/Edit Page form, scroll down to the "Body Text" textbox and insert the text cursor in the field.
  4. On the textbox toolbar, select the icon for "Paste from Word".
  5. On the "Past from Word" dialog box, follow the instructions to "use ctrl-v (or cmd-v)on your keyboard to paste the text into the window."
  6. Select the "insert" button on the "Paste from Word" dialog box.
  7. Gaze in horror at the result:

Screen Shot 2022-11-18 at 10 25 11 AM

Problem tested/confirmed in

  • macOS Monterrey 12.6.1
    • Firefox 107.0 (64-bit)

@paregorios paregorios added this to the FY2023 milestone Feb 9, 2023
@paregorios
Copy link
Member Author

What we want to get is the old behavior, i.e., just basic HTML character-level formatting comes through (bold, italic, underline, links).

@paregorios paregorios removed their assignment Mar 6, 2023
@paregorios paregorios changed the title MSWord Paste into Body Text not working Discovery: Is it quick to fix MSWord Paste into Body Text not working Mar 13, 2023
@alecpm
Copy link

alecpm commented Mar 13, 2023

It probably makes sense to test out some of the paste plugin options for the TinyMCE version we are using to see if a more restrictive set of options will help resolve issues with the current version.

There are some tips here which seem to be oriented towards TinyMCE versions 4 and 5, but they may be instructive if we need to do some customization. They could also be useful if/when we do upgrade the TinyMCE version (either using plone.app.widgets or upgrading to Plone 5.x).

Support for improved paste from Word on TinyMCE 4 and 5 is now provided by a commercial add-on which requires a TinyMCE subscription, though at some point it seems to have been available as a standalone purchase for TinyMCE 4. I think that means it's unlikely that we'd get better support out of the box by upgrading Plone/TinyMCE.

@paregorios
Copy link
Member Author

@alecpm I assume that testing these options out is a codebase/buildout tasks, yes? I don't see them surfaced in the control panel for the plugin.

@alecpm
Copy link

alecpm commented Mar 15, 2023

@paregorios Yeah, it's JS config of the widget, which probably requires a ZPT/DTML template customization (and there's no guarantee that there's a way to make the editor work with recent versions of Word). This document seems to imply that the only way to make this work reliably is to use Notepad as an intermediary for the paste (or better yet as the original rich text document source). Maybe that could be a "solution"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants