I try to add a browse picker to upload picture, but problem with base64 data undefiend when use browse picker and I have no problem with drag and drop picture.
tinymce.init(
{
height : 300,
selector : '#txtImg',
plugins : 'code advlist autolink autosave link image lists charmap print preview hr anchor pagebreak spellchecker searchreplace wordcount visualblocks visualchars fullscreen insertdatetime media nonbreaking table contextmenu directionality emoticons template textcolor paste fullpage textcolor colorpicker textpattern',
toolbar : 'undo redo | link image | code',
paste_data_images : true,
image_title : true,
automatic_uploads : false,
image_advtab: true,
file_picker_types : 'file image media',
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 id = 'blobid' + (new Date()).getTime();
var blobCache = tinymce.activeEditor.editorUpload.blobCache;
var blobInfo = blobCache.create(id, file);
blobCache.add(blobInfo);
cb(blobInfo.blobUri(), { title: file.name });
};
input.click();
}
});