diff options
| author | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-15 21:22:00 +0000 |
|---|---|---|
| committer | estadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-04-15 21:22:00 +0000 |
| commit | 422fde6e998684735cd18684e6273d564f825b2a (patch) | |
| tree | 4bcacec7d2901bdba4c138a51b4efb50ec670f81 /roundcubemail/program/js/app.js | |
| parent | 9cab47ca061b662473cf68f24f1667b813e0ee43 (diff) | |
HTML editing fixes, upgrade to TinyMCE v3.0.6
git-svn-id: https://svn.roundcube.net/trunk@1308 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/app.js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 410aad8c4..8393ecab3 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -1897,25 +1897,22 @@ function rcube_webmail() } else { - var eid = tinyMCE.getEditorId('_message'); - // editor is a TinyMCE_Control object - var editor = tinyMCE.getInstanceById(eid); + var editor = tinyMCE.get('compose-body'); // if this is null, we should exit - if (editor == null) { + if (editor == null) + { return false; - } - var msgDoc = editor.getDoc(); - var msgBody = msgDoc.body; + } if (this.env.signatures && this.env.signatures[id]) { // Append the signature as a span within the body - var sigElem = msgDoc.getElementById("_rc_sig"); + var sigElem = editor.dom.get("_rc_sig"); if (!sigElem) { - sigElem = msgDoc.createElement("span"); + sigElem = editor.getDoc().createElement("span"); sigElem.setAttribute("id", "_rc_sig"); - msgBody.appendChild(sigElem); + editor.getBody().appendChild(sigElem); } if (this.env.signatures[id]['is_html']) { @@ -3396,16 +3393,16 @@ function rcube_webmail() }; - this.toggle_editor = function(checkbox, textElementName) + this.toggle_editor = function(checkbox, textAreaId) { var ischecked = checkbox.checked; if (ischecked) { - tinyMCE.execCommand('mceAddControl', true, textElementName); + tinyMCE.execCommand('mceAddControl', true, textAreaId); } else { - tinyMCE.execCommand('mceRemoveControl', true, textElementName); + tinyMCE.execCommand('mceRemoveControl', true, textAreaId); } }; |
