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

213
Views
How to prevent contenteditable from being passed down to children

As you can see in the following snippet, when a <div> becomes contenteditable, all the children inside is, including other <div> child elements, become contenteditable too and there seems to be no way from this to happen.

I'd like to put read-only <div> elements inside a content-editable <div>.

enter image description here

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Try putting content editable false on your children:

<div contenteditable="true">
    <p>You can edit me</p>
</div>

<div contenteditable="true">
    <p contenteditable="false">You can't edit me</p>
</div>

about 4 years ago · Juan Pablo Isaza Report

0

<div contenteditable="true">
    <p>test</p>
    <p contenteditable="false">test </p>
</div>

you can use this code

about 4 years ago · Juan Pablo Isaza Report
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!