# Javascript: DocumentPermissions.readOnly Property

> Gets or sets a value specifying whether the document is read only.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: DocumentPermissions.readOnly Property
- **139 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/documentpermissions/readonly-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/documentpermissions/readonly-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/documentpermissions/readonly-property/llms-full.txt

---

### Description

Gets or sets a value specifying whether the document is read only.

### Syntax

```javascript
<boolean> DocumentPermissions.readOnly
```

### Examples

The following example demonstrates `DocumentPermissions.readOnly` in a practical document-editing workflow. It gets or sets a value specifying whether the document is read only.

```javascript
const readOnly = TXTextControl.documentPermissions.readOnly;
console.log("read only:", readOnly);
```

---

## Nearby

- **Previous:** [Javascript: DocumentPermissions.allowPrinting Property](https://docs.textcontrol.com/ds-server/reference/javascript/documentpermissions/allowprinting-property/llms-full.txt)
- **Next:** [DocumentSettings Object](https://docs.textcontrol.com/ds-server/reference/javascript/documentsettings/llms-full.txt)
