title: Quill editor + VueJS2 image upload: Base64 image to URL
body: <p>Using editor from here: <a href="https://github.com/surmon-china/vue-quill-editor" rel="noreferrer">https://github.com/surmon-china/vue-quill-editor</a></p>
  
  <p>I want to save images from Quill editor to MySQL database, but bigger images in base64 are too long to insert. </p>
  
  <p>I tried to write custom image handler, so that it auto uploads image to server and server returns image URL but now I'm stuck.</p>
  
  <p>Here is my current HTML:</p>
  
  <pre><code>&lt;quill-editor v-model="content"
      :options="editorOption"
      @onEditorBlur($event)"
      @onEditorFocus($event)"
      @onEditorReady($event)"
      @onEditorChange($event)"&gt;
  &lt;/quill-editor&gt;
  </code></pre>
  
  <p>Adding image handler to editor like this:</p>
  
  <pre><code>onEditorReady(editor) {
      editor.getModule('toolbar').addHandler('image', this.imageHandler);
      console.log('editor ready!', editor);
  },
  </code></pre>
  
  <p>And my own handler:</p>
  
  <pre><code>imageHandler(image, callback){
      console.log(image); // Always true
      console.log(callback); // Always undefined
  
      // Should get image in here somehow..
      var sendData = {
          image: 'SomethingShouldBeInHere',
      };
  
      // Send image to server, 
      //  Server will return link to image
      axios.put('/testImageUpload', sendData)
      .then(function(cbData) {
          // In here should add image tag to editor somehow..
  
      })
      .catch(function (error) {
          console.log(error);
      });
  },
  </code></pre>
  
  <p>I tried this: <a href="https://github.com/quilljs/quill/pull/995" rel="noreferrer">Add support for custom image handler</a>
  But it doesn't work, since image is always true and callback is undefined.</p>
  
  <p>Tried this too: <a href="http://codepen.io/jackmu95/pen/EgBKZr" rel="noreferrer">Quill <code>imageHandler</code> Demo</a>
  It has same problems first link.</p>
  
  <p>Currently server is hardcoded to return "<a href="http://localhost/images/php.jpg" rel="noreferrer">http://localhost/images/php.jpg</a>"</p>
  
  <p>If possible I would not use any libraries (jQuery, dropzone, etc)</p>
  
  <p>I thought I can perhaps check if image was inserted in onEditorChange(), then send request to server, get URL, search for this base64 in editor and replace it with URL, but it doesn't seem right.</p>