summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--wysiwyg_editor.admin.inc9
-rw-r--r--wysiwyg_editor.module1
3 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 25cd7fa..97f770c 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 5.x-x.x, xxxx-xx-xx
---------------------------
+#299108 by toniw: Added setting for TinyMCE's auto-cleanup paste feature.
#293916 by sun: Clarified TinyMCE compatibility in README.txt.
#293425 by sun: Fixed foreach warning during upgrade from TinyMCE module.
#292517 by sun: Fixed SQL error during upgrade from TinyMCE module.
diff --git a/wysiwyg_editor.admin.inc b/wysiwyg_editor.admin.inc
index 018dce4..077fcde 100644
--- a/wysiwyg_editor.admin.inc
+++ b/wysiwyg_editor.admin.inc
@@ -76,6 +76,7 @@ function wysiwyg_editor_profile_form($edit) {
'convert_fonts_to_spans' => TRUE,
'remove_linebreaks' => TRUE,
'apply_source_formatting' => FALSE,
+ 'paste_auto_cleanup_on_paste' => FALSE,
'css_setting' => 'theme',
'css_path' => NULL,
'css_classes' => NULL,
@@ -341,6 +342,14 @@ function wysiwyg_editor_profile_form($edit) {
'#description' => t('This option makes TinyMCE apply source formatting. Set this to true for a cleaner HTML source. Choose false to avoid conflicts with some filters.'),
);
+ $form['output']['paste_auto_cleanup_on_paste'] = array(
+ '#type' => 'select',
+ '#title' => t('Force Word cleanup on standard paste'),
+ '#default_value' => $edit->settings['paste_auto_cleanup_on_paste'],
+ '#options' => array(TRUE => t('Enabled'), FALSE => t('Disabled')),
+ '#description' => t('Enable this option to have the default paste function (CTRL-V or SHIFT-INS) to behave like the "paste from word" plugin function.'),
+ );
+
$form['css'] = array(
'#type' => 'fieldset',
'#title' => t('CSS'),
diff --git a/wysiwyg_editor.module b/wysiwyg_editor.module
index da29a9e..8126748 100644
--- a/wysiwyg_editor.module
+++ b/wysiwyg_editor.module
@@ -392,6 +392,7 @@ function wysiwyg_editor_config($profile, $theme) {
$init['convert_fonts_to_spans'] = $settings['convert_fonts_to_spans'] ? $settings['convert_fonts_to_spans'] : TRUE;
$init['remove_linebreaks'] = $settings['remove_linebreaks'] ? $settings['remove_linebreaks'] : TRUE;
$init['apply_source_formatting'] = $settings['apply_source_formatting'] ? $settings['apply_source_formatting'] : FALSE;
+ $init['paste_auto_cleanup_on_paste'] = $settings['paste_auto_cleanup_on_paste'] ? $settings['paste_auto_cleanup_on_paste'] : FALSE;
$init['theme_advanced_resize_horizontal'] = FALSE;
$init['theme_advanced_resizing_use_cookie'] = FALSE;