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, editor/editor_style.css", fontsize_formats: "10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 25px 26px 27px 28px 29px 30px 31px 32px 36px 38px 40px", 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'} ],*/ formats: { alignleft: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'left'}, aligncenter: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'center'}, alignright: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'right'}, alignfull: {selector: 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes: 'full'}, bold: {inline: 'span', 'classes': 'bold'}, italic: {inline: 'span', 'classes': 'italic'}, underline: {inline: 'span', 'classes': 'underline', exact: true}, strikethrough: {inline: 'del'}, customformat: {inline: 'span', styles: {color: '#00ff00', fontSize: '20px'}, attributes: {title: 'My custom format'}} }, 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; } }); }