Home Forums XMetaL Tips and Tricks Samples: Showing tag names in the Structure View Reply To: Samples: Showing tag names in the Structure View

Derek Read

Reply to: Samples: Showing tag names in the Structure View

The CSS in structure view supports the same CSS properties that the main editing window does, plus the few extra Structure view only XMetaL CSS extension @statements for showing special icons before elements. So, yes, you can do this. If any parent element has white-space property set on it you will need to reset it for any children if you want it to be different, keeping in mind that Structure view inherits settings from the main editing view first.

By default the white-space property is not set, so line wrapping should occur unless that property is set for the same element in the main editing window, or one of the parent elements. If you do not want line wrapping to occur in Structure view but it does for the same element in the main editing view then the same CSS settings available for use in the main editing view for the white-space property (pre, nowrap, etc) can be used in Structure view to override that.

If you want Structure view to appear the same as it does in the main editing view the easiest thing to do is provide an empty (or no) dtdname_structure.css file with your customization. Structure view inherits all the CSS from the main view first then cascades the dtdname_structure.css file on top of that, overriding anything previously set when CSS selector specificity is greater. So, if you provide no dtdname_structure.css file the Structure view should appear as close to Normal view as possible. That is typically where you should start, only adding settings to the Structure view CSS where you want elements to appear different from TagsOn / Normal view.

As for synching the two views during scrolling there is an INI setting for this listed in the Customization Guide. The request for an API to toggle this is in our list of feature requests but has yet to make it onto a release schedule.

Reply

Products
Downloads
Support