if(!$("#_editor_onthefly_field_onthefly___mold_cast__editor").length) { } else { var ed = tinymce.get("_editor_onthefly_field_onthefly___mold_cast__editor");if(ed) { ed.destroy(); }; tinymce.init({ selector :"textarea#_editor_onthefly_field_onthefly___mold_cast__editor", verify_html: false, plugins: "code,image,lists,preview,anchor,table,link",toolbar1: "undo redo bold italic fontsize | code link image table" , menubar: false, image_advtab: true, paste_data_images: true, automatic_uploads: true, images_upload_url: "https://mycarbon.solutions/system//core/lib/TinyMCE/postAcceptor.php?url=/var/www/html//files/img/upload/editor", images_upload_base_path: "https://mycarbon.solutions//files/img/upload/editor", images_upload_credentials: true, file_picker_types: "image", image_title: true, file_picker_callback: function(cb, value, meta) { var input = document.createElement("input");input.setAttribute("type", "file");input.setAttribute("accept", "image/*"); input.onchange = function() { var file = this.files[0];var reader = new FileReader();reader.readAsDataURL(file);reader.onload = function () { var id = "blobid" + (new Date()).getTime();var blobCache = tinymce.activeEditor.editorUpload.blobCache;var blobInfo = blobCache.create(id, file, reader.result);blobCache.add(blobInfo);cb(blobInfo.blobUri(), { title: file.name });};};input.click();} });
};
onthefly