Changeset 1196
- Timestamp:
- 11/08/09 04:34:16 (4 years ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
examples/testbed.html (modified) (2 diffs)
-
plugins/ContextMenu/ContextMenu.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/testbed.html
r1084 r1196 55 55 xinha_plugins = xinha_plugins ? xinha_plugins : 56 56 [ 57 'CharacterMap', 'SpellChecker', 'Linker' 57 'CharacterMap', 'SpellChecker', 'Linker', 'ContextMenu' 58 58 ]; 59 59 // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING :) … … 86 86 xinha_config.fullPage = true; 87 87 xinha_config.CharacterMap.mode = 'panel'; 88 xinha_config.ContextMenu.customHooks = { 'a': [ ['Label', function() { alert('Action'); }, 'Tooltip', '/__classpath/xinha/images/ed_copy.gif' ] ] } 88 89 /* 89 90 // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL -
trunk/plugins/ContextMenu/ContextMenu.js
r1084 r1196 27 27 28 28 Xinha.Config.prototype.ContextMenu = { 29 disableMozillaSpellCheck : false 29 disableMozillaSpellCheck : false, 30 customHooks : { } // 'a': [ ['Label', function() { alert('Action'); }, 'Tooltip', '/icon.jpg' ] ] 30 31 } 31 32 … … 238 239 Xinha._lc("Create a link", "ContextMenu"), 239 240 config.btnList["createlink"][1] ]); 241 242 if(editor.config.ContextMenu.customHooks[currentTarget.tagName.toLowerCase()]) 243 { 244 var items = editor.config.ContextMenu.customHooks[currentTarget.tagName.toLowerCase()]; 245 246 for (var i = 0; i < items.length; ++i) 247 { 248 menu.push(items[i]); 249 } 250 } 240 251 241 252 for (var i = 0; i < elmenus.length; ++i)
