X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/e6993e4bfe0e5fd38ccf554da489b5af3625c2fb..bec14a088e45d21ac12f9c5e852dd0b7e559d680:/src/editor/plugins/core/switch.js diff --git a/src/editor/plugins/core/switch.js b/src/editor/plugins/core/switch.js index 2730761..57b28b9 100644 --- a/src/editor/plugins/core/switch.js +++ b/src/editor/plugins/core/switch.js @@ -43,7 +43,7 @@ var createSwitchAction = function(createParams) { allowed: !!toSwitch, toggled: alreadyInTarget, description: description, - execute: alreadyInTarget ? function() {} : function() { + execute: alreadyInTarget ? function() {} : function(callback) { f.document.transaction(function() { if(createParams.to.tagName) { toSwitch = toSwitch.setTag(createParams.to.tagName); @@ -54,7 +54,8 @@ var createSwitchAction = function(createParams) { }, { metadata: { description: description - } + }, + success: callback }); } });