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

166
Views
Issue when trying to paste, using the keyboard, into a div with quill

In the web page I present the user a box with quill attached so that the user can mark up text before saving it.

The issue is that users are wanting to paste in text but when you click in the div and use the keyboard to paste (Cmd+V) it will not paste the data into the div. There are no errors in javascript console.

I would like the user to be able to use the keyboard to paste text into the div.

What I have since discovered is that if you right click and paste into the div you can indeed paste your text but a javascript error is generated Error from pasting in text When I drill down to line 111, I get the following from quills clipboard.js: Error line What is now interesting is that if I try and paste using the keyboard (Cmd+V) it will work.

Have other users had this issue and if so have a solution? Below is the code I use to set up the div, in case I have been using quill incorrectly.

In the html page I have linked to quill like so:

<script src="//cdn.quilljs.com/1.3.7/quill.min.js"></script>
<link href="//cdn.quilljs.com/1.3.7/quill.snow.css" rel="stylesheet" />

I have created a div to attach quill to:

<div contenteditable="true" id="popupBodyTA" name="b"  placeholder="Enter your text"></div>

When the div gets shown the following javascript gets run to set up quill:

        var toolbarOptions = [
          [{ 'size': ['small', false, 'large', 'huge'] }],  // custom dropdown
          ['bold', 'italic', 'underline'],        // toggled buttons
          [{ 'color': ['black','gray','saddlebrown','green','royalblue','purple','red'] }, { 'background': ['gainsboro','yellow','lawngreen','aqua','hotpink','violet','sandybrown'] }],          // dropdown with defaults from theme
          [{ 'list': 'ordered'}, { 'list': 'bullet' }],
          [{ 'script': 'sub'}, { 'script': 'super' }],      // superscript/subscript
          ['link'],
          ['clean']                                         // remove formatting button
        ];
        
        var options = {
          modules: {
            toolbar: toolbarOptions
          },
          theme: 'snow'};
        var editor = new Quill('#popupBodyTA', options);
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!