TinyMCE:API/tinymce.Editor/onContextMenu
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onContextMenu
[edit]
Summary
This event gets executed when the user pressed down the right mouse button or ctrl+click on Mac.
[edit]
Syntax
event_callback(<tinymce.Editor> ed, <Event> e)
[edit]
Parameters
- ed
- Sender object/Editor instance that the event occurred in.
- e
- DOM Event object, includes things like target for the event.
[edit]
Examples
// Adds an observer to the onContextMenu event using tinyMCE.init
tinyMCE.init({
...
setup : function(ed) {
ed.onContextMenu.add(function(ed, e) {
console.debug('Context menu event:' + e.target);
});
}
});
// Adds an observer to the onContextMenu event using the render method
var ed = new tinymce.Editor('someid', {
.. Some settings
});
ed.onContextMenu.add(function(ed, e) {
console.debug('Context menu event:' + e.target);
});
ed.render();
