TinyMCE:API/tinymce.Editor/onMouseDown

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onMouseDown

Summary

This event gets executed when a user pressed down the mouse button inside the editor contents.

Syntax

event_callback(<tinymce.Editor> ed, <Event> e)

Parameters

ed
Sender object/Editor instance that the event occurred in.
e
DOM Event object, includes things like target for the event.

Examples

// Adds an observer to the onMouseDown event using tinyMCE.init
tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onMouseDown.add(function(ed, e) {
          console.debug('Mouse down event: ' + e.target.nodeName);
      });
   }
});

// Adds an observer to the onMouseDown event using the render method
var ed = new tinymce.Editor('someid', {
   .. Some settings
});

ed.onMouseDown.add(function(ed, e) {
   console.debug('Mouse down event: ' + e.target.nodeName);
});

ed.render();
Personal tools