function tinymce_init(init_selector, init_width, init_height ){ tinymce.init({ //remove p tag forced_root_block : false, force_p_newlines : false, remove_linebreaks : false, force_br_newlines : true, remove_trailing_nbsp : false, verify_html : false, //end selector: init_selector, width : init_width, height : init_height, theme: "modern", invalid_elements : "script", content_css: "../css/style.css", plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste textcolor" ], toolbar: "fontsizeselect | forecolor backcolor emoticons | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | template | undo redo", templates: [ {title: 'Song Plugin', description: 'Song Plugin', "url": "template/song.php"}, {title: 'Contact Slide Plugin', description: 'Contact Slide Plugin', "url": "template/contact_slide.php"} ], /*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'} ],*/ file_browser_callback: RoxyFileBrowser }); } function RoxyFileBrowser(field_name, url, type, win) { var roxyFileman = 'fileman/index.html'; if (roxyFileman.indexOf("?") < 0) { roxyFileman += "?type=" + type; } else { roxyFileman += "&type=" + type; } roxyFileman += '&input=' + field_name + '&value=' + document.getElementById(field_name).value; if(tinyMCE.activeEditor.settings.language){ roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language; } tinyMCE.activeEditor.windowManager.open({ file: roxyFileman, title: 'Roxy Fileman', width: 850, height: 650, resizable: "yes", plugins: "media", inline: "yes", close_previous: "no" }, { window: win, input: field_name }); return false; }