Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I enabled the paste from Word button and it works fine. However, the users on our site are the public, so there is no way to train them to use the Word button. I enabled "Force cleanup on Standard Paste" and disabled the Word button in my WYSIWYG profile. Unfortunately, this feature doesn't work unless I enable rich-text in the editor (again, not something I can teach the public). I have tried both Firefox and Chrome without success. The Word code is not being stripped.
Comments
Comment #1
dmkelner CreditAttribution: dmkelner commentedApparently you must have the Word button enabled to make this work. I'd like to see it change so that the button is not necessary. Might this need to go to TinyMCE as a feature request?
Comment #2
TwoDThat cleanup process is part of the Paste plugin, which provides the Paste-text, Paste-word and Select-all buttons, so you'll need to enable one of those to make Wysiwyg tell TinyMCE to load that plugin.
There's currently no way, via the GUI, to force a plugin to be loaded when none of its buttons are enabled, but you can implement hook_wysiwyg_editor_settings_alter() like this:
It might be good to add some extra logic to check if the paste plugin is already in
$settings['plugins']
before appending it, but you get the point...Comment #3
TwoDPlease follow #1963766: Improve support for paste related options for the current status of support for paste related settings.