Context Menu

πŸ“˜

The Context Menu is a floating menu that is displayed when users long press on a link. You can enable/disable the Context Menu at runtime using the JavaScript Bridge and also select the specific actions to be displayed in the menu.

iOS Android

πŸ‘

Developer Demo

Display our demo page in your app to test during development https://median.dev/context-menu/

Configure context menu at runtime

You can enable/disable the Context Menu at runtime using the Median JavaScript Bridge and select the specific actions to be displayed in the menu.

↔️Median JavaScript Bridge

// enable or disable context menu
median.contextMenu.setEnabled(true | false);

// set menu items
median.contextMenu.setActions(['copyLink']);

The following actions are supported:

  • copyLink: Copy the selected link to the device's clipboard
  • openExternal: Open the selected link in the external browser