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

402
Views
How to display API text with hyperlink in the DOM only text, but not the link?

I need to select a text part (a array value) from an API response object, and let the text shows as plain text in the DOM. Since the text is a snippet from a web article, it could contain words with hyperlink, I use this code now, it shows each time the hyperlink, which I don't want. How can I let the text only show as plain text, but not the link?

 document.querySelector("#text").textContent = "..." + res.sentence_list[0].text + "..";
<section>
      <div id="text"></div><br>
      <div id="polarity"></div><br>
      <div id="agreement"></div><br>
      <div id="subjectivity"></div><br>
      <div id="confidence"></div><br>
      <div id="irony"></div>
</section>

here is an example: example

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!