logo

/Context Menu|v2.1.3

Class

new ContextMenu(container, options)contextmenu.jsline 23

Toast UI ContextMenu Component

PARAMETERS
NameTypeDescription

container

HTMLElement

container for placing context menu floating layers

options

object = {delay:130,usageStatistics:true}

options for context menu

Instance Methods

destroy()contextmenu.jsline 100

Destructor

register(selector, callback, menuItems)contextmenu.jsline 433

Register context menu

PARAMETERS
NameTypeDescription

selector

string

css selector for displaying contextmenu at secondary mouse button click

callback

function

callback for each menu item clicked

menuItems

Array.<MenuItem>

menu item schema

unregister(selector)contextmenu.jsline 454

Unregister context menu

PARAMETERS
NameTypeDescription

selector

string

css selector used for register context menu

RETURNS:
{

boolean

} - whether unregister is successful?
Resizable