summaryrefslogtreecommitdiff
path: root/plugins/TinyMCE
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TinyMCE')
-rw-r--r--plugins/TinyMCE/TinyMCEPlugin.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/TinyMCE/TinyMCEPlugin.php b/plugins/TinyMCE/TinyMCEPlugin.php
index d9e189375..8112b7dbb 100644
--- a/plugins/TinyMCE/TinyMCEPlugin.php
+++ b/plugins/TinyMCE/TinyMCEPlugin.php
@@ -117,9 +117,11 @@ class TinyMCEPlugin extends Plugin
*/
function onStartSaveNewNoticeWeb($action, $user, &$content, &$options)
{
- $html = $this->sanitizeHtml($action->arg('status_textarea'));
- $options['rendered'] = $html;
- $content = $this->stripHtml($html);
+ if ($action->arg('richedit')) {
+ $html = $this->sanitizeHtml($content);
+ $options['rendered'] = $html;
+ $content = $this->stripHtml($html);
+ }
return true;
}
@@ -145,8 +147,11 @@ class TinyMCEPlugin extends Plugin
theme_advanced_resizing : true,
tabfocus_elements: ":prev,:next"
});
+ $('#form_notice').append('<input type="hidden" name="richedit" value="1">');
$('#notice_action-submit').click(function() {
- tinymce.triggerSave();
+ if (typeof tinymce != "undefined") {
+ tinymce.triggerSave();
+ }
});
});
END_OF_SCRIPT;