How to add a custom code block macro?

Verilog is one of the widely used language for hardware design. Currently, Code Block Macro doesn't support verilog for syntax highliting. Is there any plan for support this lanugages? 

 

I think many companies uses verilog or VHDL for hardware design. And there are a lot of syntax hightling code for thouse languages. I think the job to support these languages is a quite simple for developers of code block macro. 

 

1 answer

0 votes
Stephen Deutsch Community Champion Jul 25, 2017

다행이 답이 있습니다!

You're in luck, because there is a solution. The Code Block macro uses syntaxhighlighter brushes in the background, and these can be installed manually (if you are using the server version).

Here is a brush for Verilog:

https://plugins.trac.wordpress.org/export/1702796/syntaxhighlighter-evolved-vhdl-brush/trunk/shBrushVerilog.js

and here is a brush for VHDL:

https://plugins.trac.wordpress.org/export/1702797/syntaxhighlighter-evolved-vhdl-brush/trunk/shBrushVhdl.js

Save those files to your computer, then go to the General Settings (you must be Confluence Admin)

  1. Click "Configure Code Macro"
  2. Click "Add a new Language"
  3. Browse and choose the brush file you saved
  4. Name the brush
  5. Click "Add" (repeat steps 2-5 for each brush)
  6. Done! Now the syntax highlighting should be visible in the code block macro.

image.png

Are you using the Cloud version of Confluence? In that case, it's even easier. Just install the free Better Code for Confluence add-on, and that has VHDL and Verilog syntax highlighting built-in.

도움이 됐다면 "답했다" 표시해주세요!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,567 views 26 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you