summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-01-22 11:55:49 +0000
committeralecpl <alec@alec.pl>2009-01-22 11:55:49 +0000
commit832594067415e664d5c562ffd31784bde491b682 (patch)
treea1400a4d6e72569b8e59e7cca207866276b06866
parentf9160ecea7c56c46360050831750cda1b943346d (diff)
- fix: don't lose spellcheck corrections when switching from plain to html editor (and spellchecking is on)
-rw-r--r--program/js/editor.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/program/js/editor.js b/program/js/editor.js
index 624509085..6b847ba00 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -74,10 +74,9 @@ function rcmail_toggle_editor(ishtml, textAreaId, flagElement)
if (ishtml)
{
- var existingPlainText = composeElement.value;
- var htmlText = "<pre>" + existingPlainText + "</pre>";
-
rcmail.display_spellcheck_controls(false);
+ var htmlText = "<pre>" + composeElement.value + "</pre>";
+
composeElement.value = htmlText;
tinyMCE.execCommand('mceAddControl', true, textAreaId);
if (flagElement && (flag = rcube_find_object(flagElement)))