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

132
Views
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 answers
Answer question

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 Report
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!