question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I extract Quill plain HTML WITHOUT any class="ql-xxx" information?

See original GitHub issue

Hi there, I’m quite happy with Quill - but getting to the final stage of implementation, I realised, that saving Quill’s Editor HTML contains Quill-specific classes, such as…

current result

  • For code blocks *: <pre class="ql-syntax" spellcheck="false"><span class="hljs-attribute">code</span></pre>

  • For size paragraphs: <span class="ql-size-huge">This is not a h1 but a huge title</span>

* does Quill follow highlight.js’ recommended implementation with that syntax for code-blocks it is using at the moment?

expected result

  • For code blocks: <pre spellcheck="false"><code>code</code></pre>

    • => no class="ql-syntax" & <span class="hljs-attribute">
  • For size paragraphs: <span style="24px">This is not a h1 but a huge title</span>

    • => no class="ql-size-huge"

I mean, I can simply disable Nr. 2 the custom sizes… But for the Code Syntaxing, I would miss that.

The challenge here is, that I’ll pass the HTML to store the text in our DB. And honestly, those class-information make the HTML messy…

Is there any oob solution for this?

P.s.: using Quill.js v1.3.4

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:13
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

19reactions
McFcolognecommented, Feb 18, 2020

This is in my case a complete showstopper for quill, because i want to use the content for emails. I definitely need inline styles and no classes.

19reactions
gweinfurthercommented, Feb 7, 2018

What good is a text editor if you can’t use the content in your page? You need to be able to export HTML.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Display The Content Of React Quill Without The Html ...
Ask questionsHow can I extract Quill plain HTML WITHOUT any classqlxxx information? Hi there I'm quite happy with Quill but getting to the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found