Hide or collapse certain tags by name in via framework or plugin
Are you missing a feature? Request its implementation here.
-
- Posts: 29
- Joined: Mon Jun 27, 2022 9:09 pm
Hide or collapse certain tags by name in via framework or plugin
Is there any way to collapse or expand certain or specific tags using any action operation or via oxygen plugin APIs ?
I want to create a custom action that collapses or expands all occurrence of a certain tag. Is there any way to achieve that?
I want to create a custom action that collapses or expands all occurrence of a certain tag. Is there any way to achieve that?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Hide or collapse certain tags by name in via framework or plugin
Hi,
You have APIs to set pseudo classes to certain elements:
ro.sync.ecss.extensions.api.AuthorPseudoClassController.setPseudoClass(String, AuthorElement)
https://www.oxygenxml.com/InstData/Edit ... oller.html
Like for example in a custom Author operation:
and then in the CSS you are using to render the XML in the Author visual editing mode you can match elements which have a custom pseudo class like for example:
Regards,
Radu
You have APIs to set pseudo classes to certain elements:
ro.sync.ecss.extensions.api.AuthorPseudoClassController.setPseudoClass(String, AuthorElement)
https://www.oxygenxml.com/InstData/Edit ... oller.html
Like for example in a custom Author operation:
Code: Select all
public void doOperation(AuthorAccess authorAccess, ArgumentsMap args)
throws AuthorOperationException {
AuthorNode[] elems = authorAccess.getDocumentController().findNodesByXPath("//element", true, true, true);
for (int i = 0; i < elems.length; i++) {
authorAccess.getDocumentController().setPseudoClass("collapse", (AuthorElement) elems[i]);
}
Code: Select all
element:collapse {
display:none;
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 29
- Joined: Mon Jun 27, 2022 9:09 pm
Re: Hide or collapse certain tags by name in via framework or plugin
Hi,
By adding the pseudo classes, it will hide the entire element. I'm just looking for collapsing or hiding certain tags (preferably how it looks like in partial tags display mode) without removing or hiding the content in them. Is there any way to achieve that?
By adding the pseudo classes, it will hide the entire element. I'm just looking for collapsing or hiding certain tags (preferably how it looks like in partial tags display mode) without removing or hiding the content in them. Is there any way to achieve that?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Hide or collapse certain tags by name in via framework or plugin
Hi,
There is an -oxy-display-tags CSS property but it does not have many values, you could hide the tags completely like this:
maybe add some custom marker image before the element:
https://www.oxygenxml.com/doc/versions/ ... -tags.html
Regards,
Radu
There is an -oxy-display-tags CSS property but it does not have many values, you could hide the tags completely like this:
Code: Select all
element:collapse {
-oxy-display-tags:none:
}
Code: Select all
element:collapse:before{
content: url(markerImage.png);
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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