michmech / xonomy

A schema-driven XML editor for the web.
MIT License
91 stars 32 forks source link

Problem with IsInvisible in the configuration #53

Open estrellagrubioG opened 5 months ago

estrellagrubioG commented 5 months ago

Helo and thanks in advance.
I have a problem with an element. In the configuration I have added this method to get if the element 'note' is invisible or not:

note: {
        isInvisible: function(jsElement) {
          var visibility = jsElement.getAttribute("type");
          return (visibility !== undefined && visibility.value === "ejemplos" ? true : false);
        }
      }

The problem is that I want hide the element 'note' inside the editor only when the attribute 'type' is equal to 'ejemplos'. But when I add this method, I can't add any element 'note' because disappear from his parent menu.
What must I do to hide this element inside the editor, making possible to add new elements 'note'?