# Class: ContextualMenuCmd

## ContextualMenuCmd()

Implementation of local command `contextualMenu`.

This command has been designed to triggered by the `contextmenu` `MouseEvent`.

- If the mouse is clicked inside the selection, the `XMLEditor` contextual menu "configured" for this selection is displayed.
- If the mouse is clicked outside the selection, the current selection, if any, is canceled, then depending on the location of the mouse click:
  - Click on some generated content (e.g. the bullet of a list item), element margin, etc, the corresponding node is selected then the `XMLEditor` contextual menu "configured" for this new selection is displayed.
  - Click elsewhere, the caret is moved nearby the mouse click. A subsequent mouse click inside the text node containing the caret will then display the browser "native" contextual menu (which is useful for fixing spell-checking errors).

## Constructor

#### new ContextualMenuCmd()

Source:
  - cmd/ContextualMenuCmd.js, line 25

### Classes

ContextualMenuCmd