Customize Syntax Highlighting colors
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Customize Syntax Highlighting colors
Hi Daryl,
There is predefined support for syntax-highlight for codeblocks, so, depending on the value of the outputclass attribute set for each specific codeblock to specify the code/languaget, the corresponding syntax-higlight coloring scheme would be applied over the codeblock's content. You can find more details in the Adding Syntax Highlights for Codeblocks in the Output section from the Oxygen XML Editor User-Guide.
This applies also for WebHelp, so I've just asked our documentation team to include that topic also in the WebHelp Responsive User-Guide.
However, there is no out-of-the-box support for customizing the syntax highlight colors.
You could most probably customize the colors using your own CSS customization.
You can find more details on how to use the internet browser's CSS inspector to identify the specific elements which your CSS rules could match and how to customize your output using CSS in this section from the WebHelp Responsive user-guide.
For an example of setting syntax-highlight colors through CSS, you should take a look at the the "syntax-highlight.css" predefined CSS, available in: [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp.responsive/oxygen-webhelp/app/topic/syntax-highlight.css
Regards,
Costin
There is predefined support for syntax-highlight for codeblocks, so, depending on the value of the outputclass attribute set for each specific codeblock to specify the code/languaget, the corresponding syntax-higlight coloring scheme would be applied over the codeblock's content. You can find more details in the Adding Syntax Highlights for Codeblocks in the Output section from the Oxygen XML Editor User-Guide.
This applies also for WebHelp, so I've just asked our documentation team to include that topic also in the WebHelp Responsive User-Guide.
However, there is no out-of-the-box support for customizing the syntax highlight colors.
You could most probably customize the colors using your own CSS customization.
You can find more details on how to use the internet browser's CSS inspector to identify the specific elements which your CSS rules could match and how to customize your output using CSS in this section from the WebHelp Responsive user-guide.
For an example of setting syntax-highlight colors through CSS, you should take a look at the the "syntax-highlight.css" predefined CSS, available in: [DITA_OT_DIR]/plugins/com.oxygenxml.webhelp.responsive/oxygen-webhelp/app/topic/syntax-highlight.css
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: Customize Syntax Highlighting colors
Post by Frank Ralf »
Hi Daryl,
The syntax highlighting is implemented in the proprietary Oxygen DITA-OT plugin com.oxygenxml.highlight which is based on the open source XSLT syntax highlighting for which the documentation can be found at https://sourceforge.net/p/xslthl/wiki/Home/.
For additional background information see https://blog.oxygenxml.com/topics/creat ... olkit.html.
Best regards,
Frank
The syntax highlighting is implemented in the proprietary Oxygen DITA-OT plugin com.oxygenxml.highlight which is based on the open source XSLT syntax highlighting for which the documentation can be found at https://sourceforge.net/p/xslthl/wiki/Home/.
For additional background information see https://blog.oxygenxml.com/topics/creat ... olkit.html.
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
-
- Posts: 1
- Joined: Thu Nov 02, 2023 1:37 pm
Re: Customize Syntax Highlighting colors
Post by marvinmartin »
Can you provide me with the specific documentation and resources for the Oxygen DITA-OT plugin?Frank Ralf wrote: ↑Fri Sep 29, 2023 1:05 pm Hi Daryl,
The syntax highlighting is implemented in the proprietary Oxygen DITA-OT plugin com.oxygenxml.highlight which is based on the open source XSLT syntax highlighting for which the documentation can be found at https://sourceforge.net/p/xslthl/wiki/Home/geometry dash subzero.
For additional background information see https://blog.oxygenxml.com/topics/creat ... olkit.html.
Best regards,
Frank
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Customize Syntax Highlighting colors
Hi,
There is no out-of-the-box documentation for various customizations, but it is possible to customize the WebHelp output (including the colors for different elements) through a CSS customization.
You can find more information on how you could use the CSS Inspector from your internet browser to inspect the output and identify the elements (classes) you should match through CSS rules, as well as how to create and use your own CSS customization, in this section from the Oxygen XML WebHelp User-Guide.
Regards,
Costin
There is no out-of-the-box documentation for various customizations, but it is possible to customize the WebHelp output (including the colors for different elements) through a CSS customization.
You can find more information on how you could use the CSS Inspector from your internet browser to inspect the output and identify the elements (classes) you should match through CSS rules, as well as how to create and use your own CSS customization, in this section from the Oxygen XML WebHelp User-Guide.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 482
- Joined: Thu Jan 23, 2014 2:29 pm
- Location: Hamburg
- Contact:
Re: Customize Syntax Highlighting colors
Post by Frank Ralf »
Hi Costin,
Thanks for that pointer. I had not thought about just overriding the CSS for the syntax highlighting. That sounds much easier than modifying the plugin.
Best regards,
Frank
Thanks for that pointer. I had not thought about just overriding the CSS for the syntax highlighting. That sounds much easier than modifying the plugin.
Best regards,
Frank
Frank Ralf
parson AG
www.parson-europe.com
parson AG
www.parson-europe.com
Return to “General XML Questions”
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