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

396
Views
How to run eval() function on codeblock generated from quill.js?

I am trying to let the user input the codeblock in a stylish way and save them to run later. For that purpose I found quill. But the code block generated by quill is text with bunch of HTML code used to style. enter image description here

For the code above the text generated by quill is

"<pre class=\"ql-syntax\" spellcheck=\"false\">console.log('hello world') ;\nif(2&lt;3 &amp;&amp; 2+6==8)\n{\n  alert('i am an alert') \n}\n</pre>"

So how can I omit all the unnecessary texts and get only the code I have written as above so that I could on eval() function on the generated string ?

about 4 years ago · Juan Pablo Isaza
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!