Folding Based On Marker Elements
Are you missing a feature? Request its implementation here.
-
- Posts: 18
- Joined: Sun May 09, 2021 7:34 am
Folding Based On Marker Elements
I would like to throw this out there as a feature request that I know I would find useful, and others might as well: the ability to fold content in Text Editor view based on the presence of 'marker' elements. By this I mean, instead of just folding the content of an element (which works great and I love this feature), I would like to be able to fold following siblings into a specific element. For example, I routinely have content that looks like this:
I would love it if I could fold all of the sibling elements that follow each 'marker' element (up to the next occurrence of a 'marker' element), such that they are out of view, and my Text Editor window would then look like this:
Such a feature would need the ability for me to define which elements are marker elements that can be folded on. Or I could possibly see it implemented as an option where any element has the ability to fold in all following siblings until the next occurrence of the specific element used for the folding.
Although my specific use case is different, I could see such a feature also being helpful in an HTML environment, where a document has a bunch of headings, each followed by a collection of p elements and images and tables, etc. The ability to fold all the content out of view, under the heading so to speak, could be useful.
Thanks for any consideration of such a feature!
Code: Select all
<parent>
<a />
<a />
<b />
<marker id="1" />
<a />
<c />
<a />
<marker id="2" />
<b />
<a />
<c />
<a />
<b />
<marker id="3" />
<b />
<c />
<a />
<marker id="4" />
<b />
<a />
<a />
</parent>
Code: Select all
<parent>
<a />
<a />
<b />
<marker id="1" />
<marker id="2" />
<marker id="3" />
<marker id="4" />
</parent>
Although my specific use case is different, I could see such a feature also being helpful in an HTML environment, where a document has a bunch of headings, each followed by a collection of p elements and images and tables, etc. The ability to fold all the content out of view, under the heading so to speak, could be useful.
Thanks for any consideration of such a feature!
-
- Posts: 18
- Joined: Sun May 09, 2021 7:34 am
Re: Folding Based On Marker Elements
Actually , for my specific use case, it would be nice to be able to do the sibling folding on not just the element level, but maybe even an element-attribute combination. I have some elements which look more like <marker markertype="a" id="1"> and <marker markertype="b" id="1">. And it would be beneficial to be able to fold siblings based on <marker markertype="a"> sometimes, and other times to fold siblings based on <marker markertype="b">.
To give another code example:
Folding this based on markertype="a" would look like:
And folding this based on markertype="b" would look like:
I hope this makes sense. Feel free to ask questions if it doesn't! The reason for using sibling marker elements instead of parent-child structure in the document is because the content of the document can really be structured in multiple different, overlapping ways. So various different document structures are held in different files and then processed together with this file based on the specific use case at the given time.
To give another code example:
Code: Select all
<parent>
<a />
<a />
<b />
<marker markertype="a" id="1" />
<a />
<c />
<a />
<marker markertype="b" id="1" />
<b />
<a />
<c />
<a />
<b />
<marker markertype="a" id="2" />
<b />
<c />
<a />
<marker markertype="b" id="2" />
<b />
<a />
<a />
<marker markertype="a" id="3" />
<b />
<c />
<c />
</parent>
Code: Select all
<parent>
<a />
<a />
<b />
<marker markertype="a" id="1" />
<marker markertype="a" id="2" />
<marker markertype="a" id="3" />
</parent>
Code: Select all
<parent>
<a />
<a />
<b />
<marker markertype="a" id="1" />
<a />
<c />
<a />
<marker markertype="b" id="1" />
<marker markertype="b" id="2" />
</parent>
-
- Posts: 18
- Joined: Sun May 09, 2021 7:34 am
Re: Folding Based On Marker Elements
Thanks for the reply, xephon. I've done some searching through the documentation, but I've only been able to find info on folding child elements into their parent element (collapsing the content of an element), not folding sibling elements into a preceding sibling. Have I missed something somewhere? Any chance you could link me to a spot in the documentation that might help me out?
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service