};
}
- description = interpolate(gettext('Insert template %s after %s'), [params.template.name, params.fragment.node.getNearestElementNode().getTagName()]);
+ description = interpolate(gettext('Insert template %s'), [params.template.name]);
return {
allowed: true,
description: description,
- execute: function(params) {
+ execute: function(callback, params) {
var node = params.fragment.node.getNearestElementNode();
node.document.transaction(function() {
var toAdd = node.document.createDocumentNode(params.template.content);
}, {
metadata: {
description: description
- }
+ },
+ success: callback
});
}
};