"Download" ...">

How to disable the "Download" tab when inserting an image in Opencart CKEditor?

After loading the image through the tab "Download"> "Download" I get this error - apparently, the file manager opens in the iframe. Since I don’t know how to fix it, and I can upload images simply from an Info> Browse Server image, how would I like to remove / disable the “Download” tab?

I tried to comment on the last 3 lines, but the download tab is still showing:

CKEDITOR.replace('description<?php echo $language['language_id']; ?>', {
    filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
    filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
    filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
    //filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
    //filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
    //filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});

I enter image description here

+5
source share
1 answer

Just paste this code before the line CKEDITOR.replace:

CKEDITOR.on('dialogDefinition', function(ev) {
    var dialogName = ev.data.name,
        dialogDefinition = ev.data.definition;
    if (dialogName === 'image') {
        dialogDefinition.removeContents('Upload');
    }
});
+4
source

All Articles