$().ready(function() { $("textarea.editor").tinymce({ // Location of TinyMCE script script_url : "/includes/js/web-editor/jscripts/tiny_mce/tiny_mce.js", // General options theme : "advanced", plugins : "autolink,lists,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,advlist", // Theme options theme_advanced_buttons1 : "cut,copy,paste,pastetext,pasteword,|,undo,redo,|,insertdate,inserttime,|, help", theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,forecolor,backcolor,|,hr,|", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, extended_valid_elements : "hr[class|width|size|noshade]", paste_use_dialog : false, theme_advanced_resizing : true, theme_advanced_resize_horizontal : true, apply_source_formatting : true, force_br_newlines : true, force_p_newlines : false, }); }); function fileBrowserCallBack(field_name, url, type, win) { var connector = "/includes/js/web-editor/file_manager.php"; my_field = field_name; my_win = win; switch (type) { case "image": connector += "?type=img"; break; case "media": connector += "?type=media"; break; case "flash": //for older versions of tinymce connector += "?type=media"; break; case "file": connector += "?type=files"; break; } //alert(connector); window.open(connector, "file_manager", "modal,width=700,height=540,scrollbars=1,top=100,left=200,statusbar=0,address=yes"); }