Config oXygen to display elements with a particular attribute and value in color
Post here questions and problems related to editing and publishing DITA content.
Config oXygen to display elements with a particular attribute and value in color
Is there a way to config oXygen to display elements with a particular attribute and value in color?
Example:
I'd like to config the editor to display all elements with the cust_attr attribute and a specific value in a color.
Display cust_attr=Yes in Green and cust_attr=No in Red.
<section cust_attr=Yes>
<ph cust_attr=No>
<li cust_attr=Yes>
Example:
I'd like to config the editor to display all elements with the cust_attr attribute and a specific value in a color.
Display cust_attr=Yes in Green and cust_attr=No in Red.
<section cust_attr=Yes>
<ph cust_attr=No>
<li cust_attr=Yes>
Re: Config oXygen to display elements with a particular attribute and value in color
Hi,
The Oxygen "Author" visual editing mode is CSS based. So you can use CSS to set various backgrounds and foregrounds for various XML elements:
https://www.oxygenxml.com/doc/versions/ ... uthor.html
Also if the XML element tags appear in the Author visual editing mode you can set various colors to them by matching them with a CSS selector:
https://www.oxygenxml.com/doc/versions/ ... -tags.html
More about how to customize the DITA CSS:
http://blog.oxygenxml.com/2016/10/custo ... iting.html
Regards,
Radu
The Oxygen "Author" visual editing mode is CSS based. So you can use CSS to set various backgrounds and foregrounds for various XML elements:
https://www.oxygenxml.com/doc/versions/ ... uthor.html
Also if the XML element tags appear in the Author visual editing mode you can set various colors to them by matching them with a CSS selector:
https://www.oxygenxml.com/doc/versions/ ... -tags.html
More about how to customize the DITA CSS:
http://blog.oxygenxml.com/2016/10/custo ... iting.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Config oXygen to display elements with a particular attribute and value in color
Hi,
Probably something like:
will show the full tag markers for that specific element with those custom colors.
Regards,
Radu
Probably something like:
Code: Select all
section[cust_attr="Yes"]{
-oxy-tags-color:white;
-oxy-tags-background-color:green;
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Config oXygen to display elements with a particular attribute and value in color
Big thanks, Radu. I can see the tags in colors now.
One last question. Do I need to define all tags that use cust_attr in the CSS file, or is there a way to make any tag that uses cust_attr in color?
One last question. Do I need to define all tags that use cust_attr in the CSS file, or is there a way to make any tag that uses cust_attr in color?
Re: Config oXygen to display elements with a particular attribute and value in color
Hi,
It's plain CSS so you can use the "*" universal elements selector:
Regards,
Radu
It's plain CSS so you can use the "*" universal elements selector:
Code: Select all
*[cust_attr="Yes"]{
-oxy-tags-color:white;
-oxy-tags-background-color:green;
}
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
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