This topic contains 1 reply, has 2 voices, and was last updated by Sean Sean 4 days, 6 hours ago.

summer note upload image


  • novamix
    Participant

    Member Reply #14111

    Hello, sorry for my English, I speak Spanish, I’m trying to upload an image with summer note, but I can not find out if the plugin is not fully integrated.

     

    a greeting.

     

    $(document).ready(function() {
    $('#summernote').summernote({
    height: 200,
    onImageUpload: function(files, editor, welEditable) {
    sendFile(files[0], editor, welEditable);
    }
    });
    function sendFile(file, editor, welEditable) {
    data = new FormData();
    data.append("file", file);
    $.ajax({
    data: data,
    type: "POST",
    url: 'savetheuploadedfile.php',
    cache: false,
    contentType: false,
    processData: false,
    success: function(url) {
    editor.insertImage(welEditable, url);
    }
    });
    }
    });

    Sean
    Sean
    Keymaster

    Posts: 4132
    Support Staff Reply #14130

    Hi,

    The image upload requires a server side code to handle the upload. However the server side part is not covered by our theme.  You can check below links to implement it:

    https://stackoverflow.com/questions/21628222/summernote-image-upload

    Image Upload In summernote Editor

    You can try to search google for more related solutions.

    Thanks.

     

     

     

You must be logged in to reply to this topic.