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

483
Visualizações
Python: Convert Quill delta to HTML

My existing project is using quill.js, And a sample quill content(delta) will look something like this

{
  "ops": [
    {
      "attributes": {
        "underline": true,
        "bold": true
      },
      "insert": " dfsdfdsf "
    },
    {
      "insert": "\n"
    }
  ]
}

Are there any pure python ways to convert these content into HTML?. I need this as a part of report generation to PDF on the server side using WeasyPrint.

Note: Kindly do not attempt to answer if you haven't used Quill.js before, or at least know what it is.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

If want to plain HTML in order to submit it to your server (for the entire edited document), you can just grab quill.root.innerHTML (which is the HTML inside the quill edit box) when your form is submitted (when the Submit button is pressed).

<form action="/SomeAction"
      method="POST"
      onsubmit="this['contents'].value = quill.root.innerHTML;"
      name="contentForm">
    <input type="hidden" name="id" value="239" />
    <input type="hidden" name="contents" value="" />
    <input type="submit" value="Submit">
</form>
over 4 years ago · Santiago Trujillo Relatório
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