I'm trying to extend the Code Block macro in Confluence to support a few new languages typically used on the mainframe (e.g., s/390 Assembler). I have successfully added the new language following the instructions in Confluence and SyntaxHighlighter. However, none of the existing color schemes are compatible with how I want the highlighting to look. I see that SyntaxHighlighter also provides for developing custom color schemes. How do I extend the available color scheme choices for Code Block sections in Confluence?
Welcome to Atlassian Community. It's nice to meet you!
It's not possible to customize the theme of the code block macro, but I've raised a feature request below for this:
In the meantime, you'll be able to use Marketplace add-ons to customize the theme of your code blocks:
Let me know if you have any questions about that.
Thank you for letting me know. One of the add-ons for Cloud supports Assembly languages but not the ones for Server.
The custom brush syntax that you use has to adhere to Custom Brush Syntax, but it looks like you can include colors that way. Have you already tried calling the colors you need with CSS and that doesn't work?
Yes, after adding the custom brushes I've been playing around with the colors and available themes. My goal is to make the code look like it does in the native z/OS terminal window since the code snippets we are documenting will be viewed by this set of developers. None of the color choices get it right 100%.
The SyntaxHighlighter on which the Code Block macro is based supports adding custom themes as well as custom brushes. My suggestion (and what I believe you are saying in the ticket you opened) is to also expose this interface to anyone wishing to customize the macro. I've added myself to the watch list for any future updates. In the mean time I'm exploring writing my own macro for this purpose.
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events