# Javascript: ComponentSettings.replaceContainer Property

> Optional. Replace the container element instead of appending ourselves to it as a child.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 32.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: ComponentSettings.replaceContainer Property
- **183 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/replacecontainer-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/replacecontainer-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/replacecontainer-property/llms-full.txt

---

### Description

Optional. Replace the container element instead of appending ourselves to it as a child.

### Syntax

```javascript
<boolean> ComponentSettings.replaceContainer
```

### Examples

The following example demonstrates `ComponentSettings.replaceContainer` in a practical document-editing workflow. Optional. Replace the container element instead of appending ourselves to it as a child.

```javascript
function inspectReplaceContainer(componentSettings) {
    const replaceContainer = componentSettings.replaceContainer;
    console.log("replace container:", replaceContainer);
}
```

---

## Nearby

- **Previous:** [Javascript: ComponentSettings.editorSettings Property](https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/editorsettings-property/llms-full.txt)
- **Next:** [Javascript: ComponentSettings.webSocketURL Property](https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/websocketurl-property/llms-full.txt)
