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

258
Views
Sweetalert2 result.value pierde saltos de línea

Por lo tanto, estoy usando Sweetalert2 para recopilar algunas notas/texto ingresados por el usuario. Descubrí que los resultados. El valor no retiene los saltos de línea, por lo que estoy tratando de descubrir cómo incluir los saltos de línea como valores codificados de URL. Nada parece funcionar:

 function getNoteFromUser(idValue) { Swal.fire({ title: 'Add a Note', input: 'textarea', icon: 'info', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Save it!' }).then(function(result) { if (result.value) { location.href="edit.php?id="+idValue+"&note="+encodeURIComponent(result.value); } }) }

El encodeURIComponent no funciona, porque los saltos de línea aparentemente no están en los resultados.valor.

¿Hay alguna manera de hacer esto?

¡Gracias!

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!