X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/8994dc92150011ef37004f0c432674fd249b88a1..c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16:/modules/rng/rng.js diff --git a/modules/rng/rng.js b/modules/rng/rng.js index c83228b..a1fe65e 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -147,7 +147,7 @@ return function(sandbox) { }, restoringStarted: function(event) { sandbox.getModule('mainBar').setCommandEnabled('save', false); - sandbox.getModule('indicator').showMessage(gettext('Restoring version ' + event.version + '...')); + sandbox.getModule('indicator').showMessage(gettext('Restoring version ') + event.version + '...'); }, historyItemAdded: function(item) { sandbox.getModule('documentHistory').addHistory([item], {animate: true}); @@ -254,11 +254,10 @@ return function(sandbox) { sandbox.getModule('documentCanvas').toggleGrid(toggle); }, newNodeRequested: function(wlxmlTag, wlxmlClass) { - if(window.getSelection().isCollapsed) { sandbox.getModule('documentCanvas').insertNewNode(wlxmlTag, wlxmlClass); - } else { - sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass); - } + }, + command: function(cmd, meta) { + sandbox.getModule('documentCanvas').command(cmd, meta); } };