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

121
Vistas
Javascript - How to parse content created using zefyr markdown editor in vue

I need to display the data created in a flutter mobile app using this editor As I know the editor implemented into the mobile apps will use markdown. At the moment the data structure is a bit complex and is something like this:

{ "title": "Lorem ipsum", "text 3": "[{\"insert\":\"lorem ipsum!\\n\"}]" }
{ "title": "Lorem ipsum", "text 4": "[{\"insert\":\"\\n\",\"attributes\":{\"heading\":3}},{\"insert\":\"other text!\\n Some other text \\\"\"},{\"insert\":\"+\",\"attributes\":{\"b\":true}},{\"insert\":\"\\\" some text.\\n ... \\\"text\\\" some text.\\n\"}]", "image 13": "{\"imagePath\":\"section2image13\",\"ratio\":0.49907578558225507}", "text 8": "[{\"insert\":\"other text \\\"text\\\", another text line.\\n text\\n\"}]"

I'm not sure how to proceed, in my vue app I'm reading the contents in this way

                <div class="modal fade" id="feedContentModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
                    <div class="modal-dialog modal-xl">
                        <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="">{{ program.title }}</h5>
                            <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                        </div>
                        <div class="modal-body" v-for="( contents, index) in JSON.parse(program.body)" :key="index">
                            {{ contents }}
                        </div>
                        </div>
                    </div>
                </div>

Since it's saved in json format, I'm using JSON.parse() to read it, but this will only solve in part the problem. I'm thinking to implement a markdown parser but not sure if will work. Can anyone suggest me a good way to solve this problem?

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