Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

404
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda