【发布时间】:2017-03-24 11:59:07
【问题描述】:
我不想 tinymce 将 blob 用于小图像,因为我正在将这些 data:images 转换为真实图像,并且在获得真实图像后我将替换 img src=""。我怎么能管理它只得到data:image 图像?是否可以?
我试过了
automatic_uploads: false
但它不会改变任何东西。
这是我的代码:
tinymce.init({
selector: strSelector + "textarea:not(#strDescription)",
paste_data_images: true,
image_advtab: true,
mode: "specific_textareas",
editor_selector: "mceEditor",
automatic_uploads: false,
file_picker_callback: function(callback, value, meta) {
if (meta.filetype == 'image') {
$('#upload').trigger('click');
$('#upload').on('change', function() {
var file = this.files[0];
var reader = new FileReader();
reader.onload = function(e) {
callback(e.target.result, {
alt: ''
});
};
reader.readAsDataURL(file);
});
}
},
plugins: [
"advlist autolink lists link image imagetools charmap preview anchor code",
"searchreplace visualblocks code fullscreen",
"insertdatetime table contextmenu paste imagetools"
],
setup: function(editor) {
editor.on('change', function() {
editor.save();
});
}
});
【问题讨论】:
标签: javascript jquery tinymce