I need to make a some parts inside an contenteditable iframe as non-editable. How do I do that? The below code works in chrome but not in firefox. Everything is editable in firefox. Ineed the checkbox to be noneditable
<iframe contentEditable="true" >
Editable text<div contentEditable="false"><input type="checkbox" /></div>
</iframe>
Use this:
Editable text<div contentEditable="false" readonly>Non content editable text</div>
If you want to use JQuery:
$('#divId').attr('readonly', 'true');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With