Changeset 1196 for trunk/examples


Ignore:
Timestamp:
11/08/09 04:34:16 (10 years ago)
Author:
gogo
Message:

Ticket #1446

Provide a means for adding custom hooks into the ContextMenu? plugin.

xinha_config.ContextMenu.customHooks = {
	 'a': [ 
		['Label', function() { alert('Action'); }, 'Tooltip', '/__classpath/xinha/images/ed_copy.gif' ] 
	      ] 
};
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/testbed.html

    r1084 r1196  
    5555      xinha_plugins = xinha_plugins ? xinha_plugins : 
    5656      [ 
    57         'CharacterMap', 'SpellChecker', 'Linker' 
     57        'CharacterMap', 'SpellChecker', 'Linker', 'ContextMenu' 
    5858      ]; 
    5959             // THIS BIT OF JAVASCRIPT LOADS THE PLUGINS, NO TOUCHING  :) 
     
    8686       xinha_config.fullPage = true; 
    8787       xinha_config.CharacterMap.mode = 'panel'; 
     88       xinha_config.ContextMenu.customHooks = { 'a': [ ['Label', function() { alert('Action'); }, 'Tooltip', '/__classpath/xinha/images/ed_copy.gif' ] ] } 
    8889/* 
    8990       // We can load an external stylesheet like this - NOTE : YOU MUST GIVE AN ABSOLUTE URL 
Note: See TracChangeset for help on using the changeset viewer.