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

131
Vistas
How could extract context from a p-tag with selected option and also others word have no option to selecte?

I have a p-tag for showing the article which contains two types - words you don't need to change and words you can select in it. E.G.1

    <div class="context">
        <p v-html="report_data" class="showTxt" id="showTxt" contenteditable="true"></p>
    </div>

and I wanna make a window for showing the result which user selected and also include others don't need to change.

** rr = $('#showTxt option:selected').text()

this way would delect other word don't need to change

r_content = document.getElementById('showTxt').textContent

and this way would show everything include all option

thanks in advance

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Your question is not clear to me, but I guess you want to get the text user selected. If so you can use getSelection.

window.getSelection().toString();
about 4 years ago · Juan Pablo Isaza Denunciar
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