0

I have used jHTMLArea to create rich text box and have been able to save and edit the same.But while showing the data in view mode.The inner html/data seems to be editable.How to set the jHtmlArea to readonly.

<textarea onblur="SaveInfo('Save')" class="txtContentDesc" id="ctl00_ContentPlaceHolder3_txtAreaS11" style="display: none;" readonly="true"></textarea>

The following code allows jHTMLArea textbox to be editable.

psobhan
  • 625
  • 3
  • 11
  • 36
  • 2
    If you want the codes to be readonly, why bother to use jHTMLArea? Ignore it and directly insert your edited html/data to an element or iframe. –  Jun 22 '16 at 11:24
  • User should be able to know that, the field can be formatted to html tags,Hence, it has been suggested to provide the view mode under jHTMLArea – psobhan Jun 22 '16 at 11:27

1 Answers1

0

This post is old but here it is:

domElement.setAttribute('contenteditable', 'false')

Adit Saxena
  • 1,617
  • 15
  • 25