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: function(field, url, type, win) { tinyMCE.activeEditor.windowManager.open({ file: '../../../uploader/browse.php?opener=tinymce4&field=' + field + '&type=' + type, title: 'Upload Your Images', width: 700, height: 500, inline: true, close_previous: false }, { window: win, input: field }); return false; } }); }