includes/clientside/tinymce/plugins/table/editor_plugin_src.js
changeset 459 31c23016ab62
parent 395 fa4c5ecb7c9a
child 476 f26a69c40431
equal deleted inserted replaced
458:c433348f3628 459:31c23016ab62
     1 /**
     1 /**
     2  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
     2  * $Id: editor_plugin_src.js 612 2008-02-19 12:33:44Z spocke $
     3  *
     3  *
     4  * @author Moxiecode
     4  * @author Moxiecode
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     5  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
     6  */
     6  */
     7 
     7 
    70 							sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
    70 							sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
    71 						} else
    71 						} else
    72 							m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true});
    72 							m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', ui : true});
    73 					});
    73 					});
    74 				}
    74 				}
       
    75 			});
       
    76 
       
    77 			// Add undo level when new rows are created using the tab key
       
    78 			ed.onKeyDown.add(function(ed, e) {
       
    79 				if (e.keyCode == 9 && ed.dom.getParent(ed.selection.getNode(), 'TABLE'))
       
    80 					ed.undoManager.add();
    75 			});
    81 			});
    76 
    82 
    77 			ed.onNodeChange.add(function(ed, cm, n) {
    83 			ed.onNodeChange.add(function(ed, cm, n) {
    78 				var p = ed.dom.getParent(n, 'td,th,caption');
    84 				var p = ed.dom.getParent(n, 'td,th,caption');
    79 
    85