Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

172
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda