Set the context menu by element type

You can configure context menus to open only when specific types of elements are clicked. Instead of applying the menu to the entire page or window, you can provide a selector that targets certain elements.

This allows you to create context menus that are specific to certain UI components, such as images, file items, or custom interface elements.

<figure><img src="https://909455594-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC8kwY8yODXmNxAtaN0Ej%2Fuploads%2FsBcZnJBzXG4hZRedxHS9%2FdivVsButton.gif?alt=media&token=0b9e28f6-e8ac-49ca-8e30-1e73f8c61b7b" alt=""><figcaption></figcaption></figure>