Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

298
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda