Configure KCFinder on TinyMCE

2
Hello, I'm using TinyMCE as a text field and I need to be able to upload images to it, and for that I am using KCFinder, but the problem is that when I click to upload images, it only a blank box appears: it follows TinyMCE initialization code (Note: I am programming in angular):

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;
        }
    };

And this is what pops up when I open the image upload in TinyMCE:

    
asked by anonymous 04.08.2016 / 16:32

1 answer

0

In the KCFinder settings file, you need to set the full URL to the directory where the images will be stored.

    
23.07.2017 / 17:22