# Javascript: DocumentSettings.getDocumentKeywords Method

> Gets the current document's keywords. The property value is null, if there are no keywords contained in the document.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 29.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: DocumentSettings.getDocumentKeywords Method
- **328 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentkeywords-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentkeywords-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentkeywords-method/llms-full.txt

---

### Description

Gets the current document's keywords. The property value is null, if there are no keywords contained in the document.

### Syntax

```javascript
<void> DocumentSettings.getDocumentKeywords(<RequestStringsCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `DocumentSettings.getDocumentKeywords` in a practical document-editing workflow. It gets the current document's keywords. The property value is null, if there are no keywords contained in the document.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.documentSettings.getDocumentKeywords(
    function(result) {
        console.log("get document keywords result:", result);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: DocumentSettings.getDocumentBasePath Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentbasepath-method/llms-full.txt)
- **Next:** [Javascript: DocumentSettings.getDocumentSubject Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/documentsettings/getdocumentsubject-method/llms-full.txt)
