响应式filemanager与tinignce在codeigniter不显示缩略图

时间:2017-08-25 09:57:54

标签: codeigniter tinymce tinymce-4 responsive-filemanager

我在Codeigniter中使用了Responsive Filemanager和tinyMce 4.6.5。 加载页面后,如果我尝试从现有图像插入图像,则不会显示缩略图(图中的示例)。

enter image description here

My Responsive Filemanager配置:

'base_url' => ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] && ! in_array(strtolower($_SERVER['HTTPS']), array( 'off', 'no' ))) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'],
'upload_dir' => '/testsite/uploads/tinyMce/thumbs/',
'current_path' => '../../uploads/tinyMce/thumbs/',
'thumbs_base_path' => '../../uploads/tinyMce/thumbs/', //opens in filemanager

tinyMce配置:

tinymce.init({
selector: selector,
height: 200,
width: 700,
theme: 'modern',
skin:'lightgray',
plugins: [
    'advlist autolink lists charmap print preview hr anchor pagebreak',
    'searchreplace wordcount visualblocks visualchars code fullscreen',
    'insertdatetime nonbreaking save table contextmenu directionality',
    'emoticons template paste textcolor textpattern imagetools toc responsivefilemanager'
],
filemanager_title:"Responsive Filemanager",
external_filemanager_path: siteURL + "scripts/filemanager/",
external_plugins: { "filemanager" : siteURL + "scripts/filemanager/plugin.min.js"},
toolbar1: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
toolbar2: 'print preview media | forecolor backcolor emoticons | help',
image_advtab: true,
templates: [
    { title: 'Test template 1', content: 'Test 1' },
    { title: 'Test template 2', content: 'Test 2' }
]
});

如果我检查图像容器,这是html:

<img class=" lazy-loaded" data-original="../../uploads/tinyMce/thumbs/doggo.jpg" src="data:image/png;base64...">

按下响应式文件管理器中的刷新按钮后,它将更改为:

<img class=" lazy-loaded" data-original="../../uploads/tinyMce/thumbs/doggo.jpg" src="../../uploads/tinyMce/thumbs/doggo.jpg" style="display: inline;">

如果按“预览”,则会显示缩略图。

提前致谢:)

1 个答案:

答案 0 :(得分:1)

尝试编辑filemanager文件夹中名为dialog.php的文件 键入搜索“img”,你会发现类img-precontainer的div。 然后你会看到“data-src”。您必须将其更改为“src”。希望它有效。

这是代码/示例https://gist.github.com/cloudsnight/f44103499e9bb5b782efea7e80b4c9a6

的链接

这是我的完整示例的链接: https://github.com/cloudsnight/testplugins.git