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

142
Views
¿Cómo puedo replicar **negrita** en mi plantilla de django?

Estoy tratando de replicar cómo el desbordamiento de pila permite al usuario escribir texto y lo produce a continuación al mismo tiempo. El siguiente código en la plantilla de Django funciona para esto.

 {% block head %} <script> function LiveTextUpdate() { var x = document.getElementById("myInput").value; document.getElementById("test").innerHTML = x; } </script> {% endblock %} {% block body %} <div class = typing_container> <div class = note_text> {{ note_form.note }} </div> </div> <div class = output_container> <div class = output_note_text> <p id="test" ></p> </div> </div>

Lo siguiente está en el archivo forms.py :

 class NoteForm(ModelForm): class Meta: model = NoteModel fields = [ 'note' ] widgets = { 'note' : Textarea(attrs={'placeholder' : 'Start a new note', 'class' : 'updated_task_commentary', 'id' : 'myInput', 'oninput' : 'LiveTextUpdate()' }), }

¿Cómo puedo replicar la capacidad de poner texto en negrita cuando el texto está rodeado por "**", por favor?

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!