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

479
Views
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 answers
Answer question

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 Report
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!