summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/editor.js
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-28 09:00:25 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-09-28 09:00:25 +0000
commitefab1199bbb43321ee273a927da417910739a1df (patch)
tree5e9a53e1bfed9f2b4e90f5e34627772b78d6c66f /roundcubemail/program/js/editor.js
parentf1c90701944e9fd9b705f2673f46f987dbffc678 (diff)
- Fix misleading display when chaning editor type (#1488104), fix handling of custom commands result
git-svn-id: https://svn.roundcube.net/trunk@5283 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/editor.js')
-rw-r--r--roundcubemail/program/js/editor.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/js/editor.js b/roundcubemail/program/js/editor.js
index 906faece7..63186fb02 100644
--- a/roundcubemail/program/js/editor.js
+++ b/roundcubemail/program/js/editor.js
@@ -115,13 +115,17 @@ function rcmail_toggle_editor(select, textAreaId, flagElement)
if (flagElement && (flag = rcube_find_object(flagElement)))
flag.value = '1';
}
- else {
- if (!res && select.tagName == 'SELECT')
- select.value = 'html';
+ else if (res) {
if (flagElement && (flag = rcube_find_object(flagElement)))
flag.value = '0';
if (rcmail.env.composebody)
rcube_find_object(rcmail.env.composebody).focus();
}
+ else { // !res
+ if (select.tagName == 'SELECT')
+ select.value = 'html';
+ else if (select.tagName == 'INPUT')
+ select.checked = true;
+ }
}