if($(".suneditor-txt").each((function(){var e=parseInt(this.getAttribute("height")),t=this.getAttribute("id"),i=SUNEDITOR.create(t,{display:"block",width:"100%",height:e,popupDisplay:"full",charCounter:!0,controlId:t,buttonList:[["undo","redo"],["font","fontSize","formatBlock"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["fontColor","hiliteColor"],["outdent","indent"],["align","horizontalRule","list","table"],["link","image","video"],["showBlocks","codeView"],["preview","print"]]});window["saveEditor"]=function(){i.save()}})),$("#close-modal-upload-image-2, #modal-upload-image-suneditor .modal-header .close").on("click",(function(){$("#modal-upload-image-suneditor").fadeOut()})),$("#select-images-modal-2").on("click",(function(){$("#modal-upload-image-suneditor iframe")[0].contentWindow.selectFile()})),"function"!==typeof onSelectImageFileElFinderSuneditor)function onSelectImageFileElFinderSuneditor(e){if($("#close-modal-upload-image-2").trigger("click"),null==__uploadImageTarget22.getAttribute("data-suneditor"))return!0;var t=$("#suneditor_"+__uploadImageTarget22.getAttribute("data-suneditor")+" .sun-editor-editable");for(var i in e){var a=e[i],o=a.indexOf("php/../files/");if(-1!==o){a="/elFinder"+a.substr(o+6);var d='<div class="se-component se-image-container __se__float-none" contenteditable="false"><figure style="margin: 0px;"><img src="'+(baseUrl+a)+'" data-align="none" alt="" data-rotate="" data-proportion="true" data-rotatex="" data-rotatey="" style="width: 100%; max-width: 100%; transform: rotate(0deg);" data-index="0" data-file-name="Nguyen_Huy_Binh1.jpg" data-file-size="0" origin-size="'+this.width+","+this.height+'" data-origin="'+this.width+","+this.height+'">'+("1"==__uploadImageTarget22.getAttribute("data-add-caption")?'<figcaption style="margin-top: 0px;" contenteditable="true"><div>Th\xeam m\xf4 t\u1ea3</div></figcaption>':"")+"</figure></div><p><br></p>";t.html(t.html()+d)}}}window["showElFinderUploadBoxSuneditor"]||(window.showElFinderUploadBoxSuneditor=function(e){if(__uploadImageTarget22=e,null!=e.getAttribute("data-suneditor")){var t=$("#suneditor_"+__uploadImageTarget22.getAttribute("data-suneditor")+" .editor_image ._se_image_check_caption")[0].checked;e.setAttribute("data-add-caption",t?1:0),$(__uploadImageTarget22).parent().parent().parent().parent().parent().find(".se-dialog-header .close").click()}void 0==$("#modal-upload-image-suneditor iframe").attr("src")&&$("#modal-upload-image-suneditor iframe").attr("src",baseUrl+"/elFinder/elfinder.legacy.suneditor.php?se_key_t="+__suneditorToken),$("#modal-upload-image-suneditor").fadeIn()});