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

dmkelner’s picture

Category: bug » feature

Apparently 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?

TwoD’s picture

That 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:

function MYMODULE_wysiwyg_editor_settings_alter(&$settings, $context) {
  if ($context['profile']->editor == 'tinymce') {
    $settings['plugins'] .= ',paste';
  }
}

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...

TwoD’s picture

Status: Active » Fixed

Please follow #1963766: Improve support for paste related options for the current status of support for paste related settings.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.