Visual editor - making sure only wlxml-tags are put into edit pane navigation
[fnpeditor.git] / modules / visualEditor.js
index 39859a8..82ee13e 100644 (file)
@@ -179,6 +179,9 @@ rng.modules.visualEditor = function(sandbox) {
         toggleGrid: function(toggle) {\r
             this.node.find('[wlxml-tag]').toggleClass('rng-hover', toggle);\r
             this.gridToggled = toggle;\r
+        },\r
+        toggleTags: function(toggle) {\r
+        \r
         }\r
     };\r
     \r
@@ -258,7 +261,7 @@ rng.modules.visualEditor = function(sandbox) {
                 id: node.parent().attr('id')\r
             }\r
             var children = [];\r
-            node.children().each(function() {\r
+            node.children('[wlxml-tag]').each(function() {\r
                 var child = $(this);\r
                 children.push({repr: child.attr('wlxml-tag') + ' / ' + (child.attr('wlxml-class') || '[[no class]]'), id: child.attr('id')});\r
             });\r
@@ -317,6 +320,8 @@ rng.modules.visualEditor = function(sandbox) {
         toolbarButtonToggled: function(btn, toggle) {\r
             if(btn === 'grid')\r
                 view.toggleGrid(toggle);\r
+            if(btn === 'tags')\r
+                view.toggleTags(toggle);\r
         },\r
         nodeHovered: function(node) {\r
             view.highlightNode(node);\r