]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/editor.js
Imported Upstream version 0.2.1
[roundcube.git] / program / js / editor.js
index a3f0d34922a4cb7f029bbd1f3e65ca24e7310cff..6b847ba0007d946314028a042042ab7556a88aba 100644 (file)
@@ -28,6 +28,8 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
       theme_advanced_buttons1 : 'bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,separator,outdent,indent,charmap,hr,link,unlink,code,forecolor',
       theme_advanced_buttons2 : ',fontselect,fontsizeselect',
       theme_advanced_buttons3 : '',
+      relative_urls : false,
+      remove_script_host : false,
       gecko_spellcheck : true
     });
   else // mail compose
@@ -49,6 +51,8 @@ function rcmail_editor_init(skin_path, editor_lang, spellcheck, mode)
       external_image_list_url : 'program/js/editor_images.js',
       spellchecker_languages : (rcmail.env.spellcheck_langs ? rcmail.env.spellcheck_langs : 'Dansk=da,Deutsch=de,+English=en,Espanol=es,Francais=fr,Italiano=it,Nederlands=nl,Polski=pl,Portugues=pt,Suomi=fi,Svenska=sv'),
       gecko_spellcheck : true,
+      relative_urls : false,
+      remove_script_host : false ,
       rc_client: rcube_webmail_client,
       oninit : 'rcmail_editor_callback'
     });
@@ -70,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)))