X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2687ec6cbbe8101a4faa232c79f5c1321dcebe6d..24e1f42110e9836448816a3297c3fb291dda5cea:/src/editor/modules/documentToolbar/documentToolbar.js?ds=inline diff --git a/src/editor/modules/documentToolbar/documentToolbar.js b/src/editor/modules/documentToolbar/documentToolbar.js index b66734f..4cc43fb 100644 --- a/src/editor/modules/documentToolbar/documentToolbar.js +++ b/src/editor/modules/documentToolbar/documentToolbar.js @@ -18,7 +18,7 @@ return function(sandbox) { var action = sandbox.createAction(actionDescription.actionName, actionDescription.actionConfig), view; addedActions.push(action); - view = actionView.create(action); + view = actionView.create(action, sandbox.getTutorialItem(action.definition.name)); _.pairs(contextParams).forEach(function(pair) { var name = pair[0], @@ -27,7 +27,7 @@ return function(sandbox) { }); group.append(view.dom); - view.on('actionExecuted', function(action, ret) { + action.on('actionExecuted', function(ret) { sandbox.publish('actionExecuted', action, ret); }); @@ -89,6 +89,7 @@ return function(sandbox) { document.on('operationEnd', function() { setContextParam('document', document); }); + setContextParam('document', document); } setContextParam('fragment', fragment);