RichTextEditor Demo
Home Pricing

## editor.setReadOnly(readOnly)

Allows you to enable/disable read-only mode.

#### Syntax

`editor.setReadOnly(readOnly)`

###### Parameter

`Type: boolean`

`True to make the editor read-only; otherwise, false.`

## Example:

1. var editor1 = new RichTextEditor("#div_editor1");
2. var toggleBtn=document.getElementById("btn_toggle");
3. toggleBtn.onclick=function(){
4. editor1.setReadOnly( ! editor1.getReadOnly() );
5. }