$(function() { $('textarea').tinymce({ // Location of TinyMCE script script_url : '/system/libs/tinymce/jscripts/tiny_mce/tiny_mce.js', // General options language : "es", // change language here mode : "specific_textareas", theme : "advanced", editor_selector : "mce", 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,wordcount,advlist,autosave", convert_urls : false, relative_urls : false, // Theme options theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,pagebreak,code,cleanup,paste,pastetext,pasteword,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo", theme_advanced_buttons2 : "link,unlink,anchor,image,charmap,iespell,media,advhr,|,tablecontrols,|,hr,|,sub,sup", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", theme_advanced_resizing : true, // Example content CSS (should be your site CSS) content_css : "/themes/ucm3/css/portada.css", // Drop lists for link/image/media/template dialogs template_external_list_url : "lists/template_list.js", external_link_list_url : "lists/link_list.js", external_image_list_url : "lists/image_list.js", media_external_list_url : "lists/media_list.js", // Style formats style_formats : [ {title : 'Bold text', inline : 'b'}, {title : 'Red text', inline : 'span', styles : {color : '#ff0000'}}, {title : 'Red header', block : 'h1', styles : {color : '#ff0000'}}, {title : 'Example 1', inline : 'span', classes : 'example1'}, {title : 'Example 2', inline : 'span', classes : 'example2'}, {title : 'Table styles'}, {title : 'Table row 1', selector : 'tr', classes : 'tablerow1'} ], // Replace values for the template plugin template_replace_values : { username : "Some User", staffid : "991234" }, file_browser_callback : 'elFinderBrowser' }); }); function elFinderBrowser (field_name, url, type, win) { var cmsURL = '/system/libs/tinymce/elfinder/elfinder.php?mypag='; // script URL - use an absolute path! if (cmsURL.indexOf("?") < 0) { //add the type as the only query parameter cmsURL = cmsURL + "?type=" + type; } else { //add the type as an additional query parameter // (PHP session ID is now included if there is one at all) cmsURL = cmsURL + "&type=" + type; } tinyMCE.activeEditor.windowManager.open({ file : cmsURL, title : 'Gestor de ficheros', width : 900, height : 450, resizable : "yes", inline : "yes", // This parameter only has an effect if you use the inlinepopups plugin! popup_css : false, // Disable TinyMCE's default popup CSS close_previous : "no" }, { window : win, input : field_name }); return false; }