我正在使用TinyMCE作为文本字段,我需要可以将图像上传到其中,为此我使用的是KCFinder,正是问题是当我点击上传图片时,它只显示一个框白色:以下初始化代码到TinyMCE(注意:我正在以角度编程):
vm.tinymceOptions = {
resize: false,
height: 300,
menubar: false,
plugins: 'autolink link image preview fullscreen textcolor ',
toolbar: 'undo, redo | styleselect | cut, copy, paste | bold, italic, underline, strikethrough | subscript, superscript | alignleft aligncenter alignright | link image | preview, forecolor',
file_browser_callback: function(field, url, type, win) {
tinyMCE.activeEditor.windowManager.open({
file: 'app/template/plugin/kcfinder/browse.php?opener=tinymce4&field=' + field + '&type=' + type,
title: 'KCFinder - Caminho atual: ',
width: 700,
height: 400,
inline: true,
close_previous: false
}, {
window: win,
input: field
});
return false;
}
};
这就是我在TinyMCE中打开图片上传时出现的内容:
答案 0 :(得分:0)
config.php
// GENERAL SETTINGS
'disabled' => **true**,
'uploadURL' => "upload",
'uploadDir' => "",
'theme' => "default",
变化 //一般设定
'disabled' => **false**,
'uploadURL' => "upload",
'uploadDir' => "",
'theme' => "default",