},\r
restoringStarted: function(event) {\r
sandbox.getModule('mainBar').setCommandEnabled('save', false);\r
- sandbox.getModule('indicator').showMessage(gettext('Restoring version ' + event.version + '...'));\r
+ sandbox.getModule('indicator').showMessage(gettext('Restoring version ') + event.version + '...');\r
},\r
historyItemAdded: function(item) {\r
sandbox.getModule('documentHistory').addHistory([item], {animate: true});\r
sandbox.getModule('documentCanvas').toggleGrid(toggle);\r
},\r
newNodeRequested: function(wlxmlTag, wlxmlClass) {\r
- if(window.getSelection().isCollapsed) {\r
sandbox.getModule('documentCanvas').insertNewNode(wlxmlTag, wlxmlClass);\r
- } else {\r
- sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
- }\r
+ },\r
+ command: function(cmd, meta) {\r
+ sandbox.getModule('documentCanvas').command(cmd, meta);\r
}\r
};\r
\r