title: Summernote Show Images that have been uploaded to a folder
body: <p>I am using the really nice Summernote Editor for a little webapp. 
  Instead of using the default inline base64 code for images I am storing the images in a folder.</p>
  
  <p>I have that part working as intended. I am able to click the "image" icon and select an image and it will upload it to a folder on my server in its original type (jpg, png, gif).</p>
  
  <p>The problem is that even though the image gets uploaded properly, Summernote does not add it to the editor ... so it doesn't show.</p>
  
  <p>Here is the relevant code I am using:</p>
  
  <pre><code>    $(function() {
       $('.summernote').summernote({
        lang: 'en-EN',
        height: 500,
        onImageUpload: function(files, editor, $editable) {
        sendFile(files[0],editor,$editable);
        }  
  
      });
      function sendFile(file,editor,welEditable) {
        data = new FormData();
        data.append("file", file);
         $.ajax({
         url: "uploader.php",
         data: data,
         cache: false,
         contentType: false,
         processData: false,
         type: 'POST',
         success: function(data){
         alert(data);
          editor.insertImage(welEditable, data);
      },
         error: function(jqXHR, textStatus, errorThrown) {
         console.log(textStatus+" "+errorThrown);
        }
      });
     }
  
    });
  </code></pre>
  
  <p>The uploader.php file looks like this:</p>
  
  <pre><code>&lt;?php
    // A list of permitted file extensions
      $allowed = array('png', 'jpg', 'gif','zip');
  
  if(isset($_FILES['file']) &amp;&amp; $_FILES['file']['error'] == 0){
  
  $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
  
  if(!in_array(strtolower($extension), $allowed)){
      echo '{"status":"error"}';
      exit;
  }
  
      if(move_uploaded_file($_FILES['file']['tmp_name'],
      'images/'.$_FILES['file']['name'])){
      $tmp='images/'.$_FILES['file']['name'];
      echo 'images/'.$_FILES['file']['name'];
      //echo '{"status":"success"}';
      exit;
      }
     }
  
  echo '{"status":"error"}';
  exit;
  ?&gt;
  </code></pre>
  
  <p>Any ideas as to why the Summernote editor will not show the saved (stored) images in the editor?</p>
  
  <p>Thanks</p>