var url=window.location.toString(); var str=""; var str_lang=""; if(url.indexOf("?")!=-1){ var ary=url.split("?")[1].split("&"); for(var i in ary){ str=ary[i].split("=")[0]; if (str == "lg") { str_lang = decodeURI(ary[i].split("=")[1]); } } } if(str_lang=='') str_lang='E'; switch(str_lang){ case 'E': default: str='en'; break; case 'T': str='zh-tw'; break; case 'S': str='zh-cn' break; case 'J': str='ja'; break; } tinyMCE.init({ // General options mode : "specific_textareas", //editor_selector : "mceEditor", elements : "buyerMsg", width:"100%", height:"180px", theme : "advanced", language : str, plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options extended_valid_elements : "iframe[src|width|height|name|align]", theme_advanced_buttons1 : "bold,italic,underline,strikethrough,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_buttons4 : "", /*theme_advanced_buttons2 : "pasteword,bullist,numlist,outdent,indent,undo,redo,link,unlink,anchor,image,media,code,insertdate,inserttime,preview", theme_advanced_buttons3 : "forecolor,backcolor,tablecontrols,hr,removeformat,visualaid", theme_advanced_buttons4 : "sub,sup,charmap,iespell,advhr,print,fullscreen", /**/ theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : false, force_br_newlines: true, relative_urls: false, remove_script_host: false, // Example content CSS (should be your site CSS) content_css : "css/content.css", // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" } });