+ };\r
+ \r
+ eventHandlers.documentToolbar = {\r
+ ready: function() {\r
+ views.visualEditing.setView('toolbar', sandbox.getModule('documentToolbar').getView());\r
+ },\r
+ toggleGrid: function(toggle) {\r
+ sandbox.getModule('documentCanvas').toggleGrid(toggle);\r
+ },\r
+ newNodeRequested: function(wlxmlTag, wlxmlClass) {\r
+ if(window.getSelection().isCollapsed) {\r
+ sandbox.getModule('documentCanvas').insertNewNode(wlxmlTag, wlxmlClass);\r
+ } else {\r
+ sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);\r
+ }\r
+ }\r
+ };\r
+ \r
+ eventHandlers.nodeBreadCrumbs = {\r
+ ready: function() {\r
+ views.visualEditing.setView('statusBar', sandbox.getModule('nodeBreadCrumbs').getView());\r
+ },\r
+ nodeHighlighted: function(id) {\r
+ sandbox.getModule('documentCanvas').highlightNode(id);\r
+ },\r
+ nodeDimmed: function(id) {\r
+ sandbox.getModule('documentCanvas').dimNode(id);\r
+ },\r
+ nodeSelected: function(id) {\r
+ sandbox.getModule('documentCanvas').selectNode(id);\r
+ } \r