thomascube
2010-06-18 9689f5b54ddc29cce84cffe2c07628a7fb56edfc
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',