Configure Kcfinder in Tinymce

Asked

Viewed 117 times

0

Hello, I am using Tinymce as a text field and I need it to be possible to upload images on it, and for that I am using Kcfinder, only the problem is that when I click to upload images, it appears only a blank box: follow 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 appears when I open the image upload in Tinymce: inserir a descrição da imagem aqui

1 answer

0


In the Kcfinder settings file, you need to set the full URL for the directory in which the images will be stored.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.