# ContextMenuItem Object

> A context menu item.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 31.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > ContextMenuItem Object
- **644 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/llms-full.txt

---

### Description

A context menu item.

### Syntax

```javascript
{
   [isChecked: <boolean>],
   [isEnabled: <boolean>],
   text: <string>,
   [imageUrl: <string>],
   [items: <ContextMenuItem[]>],
   [dropDownIsScrollable: <boolean>],
   [clickHandler: <ContextMenuItemClickHandler>]
}
```

### Examples

The following example demonstrates `ContextMenuItem` in a practical document-editing workflow. A context menu item.

```javascript
function inspectContextMenuItem(contextMenuItem) {
    console.log("is checked:", contextMenuItem.isChecked);
    console.log("is enabled:", contextMenuItem.isEnabled);
    console.log("text:", contextMenuItem.text);
    console.log("image url:", contextMenuItem.imageUrl);
}
```

---

## In This Section

- [Javascript: ContextMenuItem.clickHandler Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/clickhandler-property/llms-full.txt): Optional. The custom menu item's click handler callback function.
- [Javascript: ContextMenuItem.dropDownIsScrollable Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/dropdownisscrollable-property/llms-full.txt): Optional. Set this to true if the item's child menu should be scrollable. The default value is false.
- [Javascript: ContextMenuItem.imageUrl Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/imageurl-property/llms-full.txt): Optional. The menu item's icon image URL. Can be a base64 encoded image data URL (e. g. "data:image/png;base64,iVBORw0KG...") or any other valid image URL.
- [Javascript: ContextMenuItem.isChecked Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/ischecked-property/llms-full.txt): Optional. Specifies whether the menu item has a check mark symbol in front of it. The default value is false.
- [Javascript: ContextMenuItem.isEnabled Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/isenabled-property/llms-full.txt): Optional. Specifies whether the menu item is enabled or not. The default value is true.
- [Javascript: ContextMenuItem.items Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/items-property/llms-full.txt): Optional. The child menu items.
- [Javascript: ContextMenuItem.text Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/text-property/llms-full.txt): The menu item text. Set this to an empty string to add a horizontal separator line.

---

## Nearby

- **Previous:** [ContextMenuEventCallback Function](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenueventcallback/llms-full.txt)
- **Next:** [Javascript: ContextMenuItem.clickHandler Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/contextmenuitem/clickhandler-property/llms-full.txt)
