2017-01-18 07:58:48 +00:00
|
|
|
/**
|
2017-06-29 16:31:16 +00:00
|
|
|
* Text extraction plugin.
|
2017-01-18 07:58:48 +00:00
|
|
|
*/
|
|
|
|
Draw.loadPlugin(function(ui)
|
|
|
|
{
|
|
|
|
// Adds resource for action
|
|
|
|
mxResources.parse('extractText=Extract Text...');
|
|
|
|
|
|
|
|
// Adds action
|
|
|
|
ui.actions.addAction('extractText', function()
|
|
|
|
{
|
|
|
|
mxUtils.popup(ui.editor.graph.getIndexableText());
|
|
|
|
});
|
|
|
|
|
|
|
|
var menu = ui.menus.get('extras');
|
|
|
|
var oldFunct = menu.funct;
|
|
|
|
|
|
|
|
menu.funct = function(menu, parent)
|
|
|
|
{
|
|
|
|
oldFunct.apply(this, arguments);
|
|
|
|
|
|
|
|
ui.menus.addMenuItems(menu, ['-', 'extractText'], parent);
|
|
|
|
};
|
|
|
|
});
|