<script src="assets/plugins/custom/tinymce/tinymce.bundle.js"></script>
<script>
"use strict";
<?php $editor_flds_id_arr = []; 
	if($language_list){ 
		foreach($language_list as $language){
			array_push($editor_flds_id_arr,'#description_'.$language['code']);
		}
	}
?>
var KTTinymce = function () {    
    // Private functions
    var demos = function () {                
        tinymce.init({
            selector: '<?=implode(", ",$editor_flds_id_arr)?>',
			relative_urls : false,
            menubar: false,
            toolbar: ['styleselect fontselect fontsizeselect',
                'undo redo | cut copy paste | bold italic | link image | alignleft aligncenter alignright alignjustify',
                'bullist numlist | outdent indent | blockquote subscript superscript | advlist | autolink | lists charmap | print preview |  code'], 
            plugins : 'advlist autolink link image lists charmap print preview code'
        });
    }

    return {
        // public functions
        init: function() {
            demos(); 
        }
    };
}();

// Initialization
jQuery(document).ready(function() {
    KTTinymce.init();
});

function showBannerImage(){
	var image = $('#uploaded_photo_image').val();
	loadModal('xl');
	var html = '<div class="modal-header">' +
			'<h5 class="modal-title" id="exampleModalLabel">Photo</h5>' +
			'<button type="button" class="close" data-dismiss="modal" aria-label="Close">' +
			'<i aria-hidden="true" class="ki ki-close"></i>' +
			'</button>' +
			'</div>' +
			'<div class="modal-body">'+
			'<img src="<?=base_url()?>/public/uploads/'+image+'" alt="'+image+'" class="img-fluid">' +
			'</div>';
			//alert(html);
	$('#popup_wrapper_model_content').html(html);	
}
</script>