Current File : //etc/zpanel/panel/etc/apps/webmail/program/js/editor.min.js
function rcmail_editor_init(a){var b={mode:"textareas",editor_selector:"mce_editor",apply_source_formatting:!0,theme:"advanced",language:a.lang,content_css:a.skin_path+"/editor_content.css?v2",theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_buttons3:"",theme_advanced_statusbar_location:"none",extended_valid_elements:"font[face|size|color|style],span[id|class|align|style]",relative_urls:!1,remove_script_host:!1,gecko_spellcheck:!0,convert_urls:!1,external_image_list:window.rcmail_editor_images,
rc_client:rcmail};"identity"==a.mode?$.extend(b,{plugins:"paste,tabfocus",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"}):($.extend(b,{plugins:"paste,emotions,media,nonbreaking,table,searchreplace,visualchars,directionality,inlinepopups,tabfocus"+(a.spellcheck?",spellchecker":""),theme_advanced_buttons1:"bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,outdent,indent,ltr,rtl,blockquote,|,forecolor,backcolor,fontselect,fontsizeselect",
theme_advanced_buttons2:"link,unlink,table,|,emotions,charmap,image,media,|,code,search,undo,redo",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",spellchecker_rpc_url:"?_task=utils&_action=spell_html&_remote=1",spellchecker_enable_learn_rpc:a.spelldict,accessibility_focus:!1,oninit:"rcmail_editor_callback"}),b.setup=function(a){a.onSetProgressState.add(function(a,
b){b||rcmail.spellcheck_state()});a.onKeyPress.add(function(a,b){rcmail.compose_type_activity++})});window.rcmail_editor_settings&&$.extend(b,window.rcmail_editor_settings);tinyMCE.init(b)}
function rcmail_editor_callback(){var a={},b=rcube_find_object("_from"),c=rcmail.env.compose_focus_elem;rcmail.env.default_font&&(a["font-family"]=rcmail.env.default_font);rcmail.env.default_font_size&&(a["font-size"]=rcmail.env.default_font_size);(a["font-family"]||a["font-size"])&&$(tinyMCE.get(rcmail.env.composebody).getBody()).css(a);b&&"select-one"==b.type&&(rcmail.change_identity(b),c&&c.id!=rcmail.env.composebody&&window.setTimeout(function(){window.focus();c.focus()},10));rcmail_editor_tabindex(c&&
c.id==rcmail.env.composebody);$(window).resize()}function rcmail_editor_tabindex(a){if("mail"==rcmail.env.task){var b=tinyMCE.get(rcmail.env.composebody);if(b){var c=b.getElement(),d=b.getContentAreaContainer().childNodes[0];c&&d&&(d.tabIndex=c.tabIndex);a&&b.getBody().focus()}}}
function rcmail_toggle_editor(a,b,c){var d,e;e="SELECT"!=a.tagName?a.checked:"html"==a.value;b=rcmail.command("toggle-editor",{id:b,mode:e?"html":"plain"});e?(setTimeout("rcmail_editor_tabindex(true);",500),c&&(d=rcube_find_object(c))&&(d.value="1")):b?(c&&(d=rcube_find_object(c))&&(d.value="0"),rcmail.env.composebody&&rcube_find_object(rcmail.env.composebody).focus()):"SELECT"==a.tagName?a.value="html":"INPUT"==a.tagName&&(a.checked=!0)}
function rcmail_editor_images(){var a,b=rcmail.env.attachments,c=[];for(a in b)att=b[a],att.complete&&att.mimetype.startsWith("image/")&&c.push([att.name,rcmail.env.comm_path+"&_id="+rcmail.env.compose_id+"&_action=display-attachment&_file="+a]);return c};