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

287
Views
edit text that was wrapped in html tag before in an editable container

The image of what need to achieve

Hi everyone,

I am building a songbook app in react, where you can add song's lyrics with chords. Now I am stuck in programing the editor.

The idea is that when I select some text in editable div at the top I want to put a button which, the moment I click it wraps the selected text with <span class="songChord">the selected text here</span> which then I can "push" in database.

Later I want to be able to edit the lyrics, so the moment I put my cursor in a previously wrapped text want to be able to change the <span class="songChord"> to something like <span class="songChord2"> or remove it at all.

""**something like this happens with traditional text editor with the option to add hyperlink to the selected text and the option to change or remove that hyperlink anytime""

I need your help guys to point me in the right direction, any idea or library.

PS. I've attached an illustration of what I want to achieve

I'm a bit new in programming

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!