# Javascript: ParagraphFormat.getFrame Method

> Gets the framesetting of the paragraph.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: ParagraphFormat.getFrame Method
- **387 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getframe-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getframe-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getframe-method/llms-full.txt

---

### Description

Gets the framesetting of the paragraph.

### Syntax

```javascript
<void> ParagraphFormat.getFrame(<RequestFrameCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the frame setting of the paragraph. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `ParagraphFormat.getFrame` in a practical document-editing workflow. It gets the framesetting of the paragraph.

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

TXTextControl.paragraphFormat.getFrame(
    function(frame) {
        if (!frame) {
            console.warn("No frame was returned.");
            return;
        }
        
        console.log("get frame result:", frame);
    },
    onTxError
);
```

### Remarks

The property's default value is Frame.None. The property returns its default value when the text selection contains multiple paragraphs with mixed frames. The Selection.getIsCommonValueSelected method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [Javascript: ParagraphFormat.getDirection Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getdirection-method/llms-full.txt)
- **Next:** [Javascript: ParagraphFormat.getFrameDistance Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/paragraphformat/getframedistance-method/llms-full.txt)
