1/** 2 * Text extraction plugin. 3 */ 4Draw.loadPlugin(function(ui) 5{ 6 // Adds resource for action 7 mxResources.parse('extractText=Extract Text...'); 8 9 // Adds action 10 ui.actions.addAction('extractText', function() 11 { 12 var dlg = new EmbedDialog(ui, ui.editor.graph.getIndexableText(), 13 null, null, null, 'Extracted Text:'); 14 ui.showDialog(dlg.container, 450, 240, true, true); 15 dlg.init(); 16 }); 17 18 var menu = ui.menus.get('extras'); 19 var oldFunct = menu.funct; 20 21 menu.funct = function(menu, parent) 22 { 23 oldFunct.apply(this, arguments); 24 25 ui.menus.addMenuItems(menu, ['-', 'extractText'], parent); 26 }; 27}); 28