Hi @Cherry P
Per my test and research, the sample $("div[id^='Notes']").attr("contentEditable","false").css('background-color','#F6F6F6');
you provided is correct. Because the readonly
attribute is only for input
tags.
For div tag, contenteditable
attribute will control if it is editable. So we are unable to set readonly for a div tag. Please refer to the following document
https://developer.mozilla.org/en/docs/Web/API/HTMLElement/contentEditable
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.