The
ContextMenuState
object controls the visibilty of iOS context menus, i.e. the Cut/Copy/Paste menu.
By default, installation of this plugin hides the context menu.
ContextMenuState
issue tracker
This installation method requires cordova 5.0+
cordova plugin add cordova-plugin-context-menu-state
It possible to install via repo url directly.
cordova plugin add https://github.com/mtechaccess/cordova-plugin-context-menu-state.git
This plugin defines the global ContextMenuState
object.
Although in the global scope, it is not available until after the deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(ContextMenuState);
ContextMenuState.setVisible(true);
}
- ContextMenuState.setVisible
On iOS, show or hide the context menu:
ContextMenuState.setVisible(true);
ContextMenuState.setVisible(false);
- iOS