From 69d05c371029b7915cf2a87d6e552d9853244644 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 19 Mar 2010 14:53:30 +0000 Subject: - TinyMCE 3.3.1 --- .../plugins/contextmenu/editor_plugin_src.js | 38 ++++++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'program/js/tiny_mce/plugins/contextmenu') diff --git a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js index a2c1866ba..26e9ce2f8 100644 --- a/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js +++ b/program/js/tiny_mce/plugins/contextmenu/editor_plugin_src.js @@ -1,18 +1,43 @@ /** - * $Id: editor_plugin_src.js 848 2008-05-15 11:54:40Z spocke $ + * editor_plugin_src.js * - * @author Moxiecode - * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved. + * Copyright 2009, Moxiecode Systems AB + * Released under LGPL License. + * + * License: http://tinymce.moxiecode.com/license + * Contributing: http://tinymce.moxiecode.com/contributing */ (function() { var Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM; + /** + * This plugin a context menu to TinyMCE editor instances. + * + * @class tinymce.plugins.ContextMenu + */ tinymce.create('tinymce.plugins.ContextMenu', { + /** + * Initializes the plugin, this will be executed after the plugin has been created. + * This call is done before the editor instance has finished it's initialization so use the onInit event + * of the editor instance to intercept that event. + * + * @method init + * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. + * @param {string} url Absolute URL to where the plugin is located. + */ init : function(ed) { var t = this; t.editor = ed; + + /** + * This event gets fired when the context menu is shown. + * + * @event onContextMenu + * @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event. + * @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed. + */ t.onContextMenu = new tinymce.util.Dispatcher(this); ed.onContextMenu.add(function(ed, e) { @@ -35,6 +60,13 @@ ed.onKeyDown.add(hide); }, + /** + * Returns information about the plugin as a name/value array. + * The current keys are longname, author, authorurl, infourl and version. + * + * @method getInfo + * @return {Object} Name/value array containing information about the plugin. + */ getInfo : function() { return { longname : 'Contextmenu', -- cgit v1.2.3