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

190
Visualizações
Quill - after.appendChild is not a function

Here's the Code Sandbox reproduction.

https://codesandbox.io/s/intelligent-chihiro-9rp0d?file=/src/index.js:1285-1329


I've got a place in my application, where I need to insert the contents for the quill editor (a disabled one) so that a user could preview a composed Email before sending it.

enter image description here

There's a custom bloat called "Variable". It's used as a placeholder and gets substituted with some real data on the server (when sending an email to multiple recepients). It's represented by these blue rectangles on the pic. above.

The problem is the following. Even if I don't use any of these cutom bloats, if the whole message body looks like a single string with at least two formatting blocks in it, I get the error message specified in the header: "after.appendChild is not a function":

enter image description here

This is what I have on the step 3 (when editing)

enter image description here

And this is when previewed on the step 4 (it's inserted with the quillInstance.setContents method).

enter image description here

And the console.

So what did I do. I took the actual data object which gets inserted into that new quill editor instance via the .setContents method and tried to reproduce the issue in isolation (see the Code Sandbox repro link at the top).

And I found an interesting thing. It turns out that the problem resolves if you comment out the following lines:

Quill.register({
  "formats/Variable": Variable
});

So it looks like it doesn't even matter if the bloat is used or not; it only matters if the bloat is registered at all. And if it is, then the code doesn't work properly.

enter image description here

vs.

enter image description here

So, what can I do about it? Would appreciate any help!

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