smartxml: ElementNode.getLastTextNode
[fnpeditor.git] / src / editor / plugins / core / templates.js
index 69e30f9..7d6d74f 100644 (file)
@@ -38,7 +38,7 @@ var insertTemplateAction = {
         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);
@@ -46,7 +46,8 @@ var insertTemplateAction = {
                 }, {
                     metadata: {
                         description: description
-                    }
+                    },
+                    success: callback
                 });
             }
         };