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

150
Visualizações
How do I implement bold/italic/ wordpad-like features in js?

here's the reference image

I am trying to make a simple blog, and I've got the backend and database parts down. I have two fields- one for the title and the other for the description. Currently, I'm saving these in a table without any markup. I think storing titles without any markup is okay as I can always render them in h2 tags when fetching from the database into the frontend. The problem is- I want to implement bold/italic/hyperlink-like features and I don't how to do it. I am not looking for code- I will do that on my own- just the approach I should take. I think I could change the textarea's content on button click and that should work. Should I be saving the HTML markup into the sql table or is there a better way? Thanks in advance :)

Here's rough example of what I will be doing if it helps.

boldButton.addEventListener( 
 'click',
 () => {
  textArea.value = '<b>'+ textArea.value + '</b>';
}
)
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