documentToolbar module
[fnpeditor.git] / modules / documentCanvas / documentCanvas.js
index 7e7fdf0..ac978f2 100644 (file)
@@ -92,7 +92,7 @@ return function(sandbox) {
                 anchor.before(newNode)\r
             else\r
                 anchor.after(newNode);\r
-            mediator.nodeCreated(newNode);\r
+            this.selectNode(newNode);\r
             //isDirty = true;\r
             sandbox.publish('contentChanged');\r
         },\r
@@ -115,7 +115,8 @@ return function(sandbox) {
                 $(node).replaceWith(newNode);\r
                 newNode.before(prefix);\r
                 newNode.after(suffix);\r
-                mediator.nodeCreated(newNode);\r
+                \r
+                this.selectNode(newNode);\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r
@@ -141,7 +142,8 @@ return function(sandbox) {
                 node.replaceWith(newNode);\r
                 newNode.before(prefixNode);\r
                 newNode.after(suffixNode);\r
-                mediator.nodeCreated(newNode);\r
+                \r
+                this.selectNode(newNode);\r
                 //isDirty = true;\r
                 sandbox.publish('contentChanged');\r
             }\r
@@ -246,8 +248,16 @@ return function(sandbox) {
         },\r
         selectNode: function(id) {\r
             view.selectNodeById(id);\r
+        },\r
+        toggleGrid: function(toggle) {\r
+            view.toggleGrid(toggle);\r
+        },\r
+        insertNewNode: function(wlxmlTag, wlxmlClass) {\r
+            view.insertNewNode(wlxmlTag, wlxmlClass);\r
+        },\r
+        wrapSelectionWithNewNode: function(wlxmlTag, wlxmlClass) {\r
+            view.wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
         }\r
-        \r
     }\r
     \r
 };\r