Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

637
Views
Quill.js - how to upload image in cloud storage and insert it on DOM as url and not base64

I'm using vue-quill into a project to let the user create contents. I need to modify the way that is used by quill to insert images into the DOM, I need that the images are uploaded on cloud storage and then into the dom is inserted an <img src="..."> tag with an url to the uploaded image and not a base64 image like it will occur by default.

At the moment I've this code in my component template

<template>
    <div class="col-sm-12 col-md-9 col-lg-9 p-0 mb-3" id="programEditorWrapper">
        <QuillEditor 
            ref="programEditor" 
            :options="options"
            theme="snow" content-type="html" 
            toolbar="full" 
            @update:content="$emit('update:content', $event)"
        >
        </QuillEditor>
    </div>
</template>

And in js part of the code I've started writing this code that will use an handler

<script>
import { store } from '@/store/index'
import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.snow.css'

export default {
    name: 'ProgramEditor',
    components: {
        QuillEditor
    },
    emits: [
        'update:content'
    ],
    data() {
        return {
            options: {
                modules: {
                    toolbar: {
                        handlers: {
                            image: this.imageHandler
                        }
                    }
                }
            }
        }
    },
    mounted() {
        this.$refs.programEditor.setHTML('')
    },
    methods: {
        imageHandler() {
            // this.$refs.programEditor.getModule("toolbar").addHandler("image", imgHandler)
            
        }
    }
}
</script>

What I don't underastand is how the handler works, I saw some example here and here and they will need to create a dynamic input file to use custom handler, what instead I need is to only upload the file and put it on the DOM into an img tag as a normal url.

Any suggestion or help please?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!