One of the things that was annoying for me is adding code to my web site and blog. What I do is I have to go to the code word by word and apply the styles manually. This task usually takes a lot of time to do it. During the last few days, I was working on creating a tool that can help me in doing that task in much faster way. For that reason, I created the tool "Java Syntax Highlighter". The tool can be found at https://www.programmingacademia.com/en/tools/java-syntax-highlighter
How to Use The Tool
The tool is very easy to use all of what you have to do is the following:
- Include the following CSS file in your web page:
Code
<link rel="stylesheet" href="https://www.programmingacademia.com/res/css/code-theme.css">
After that, copy your java code and past it within the tool. Once you do that, click the button 'Highlight' and you will get two things:
- HTMl code.
- A preview of how the code snippet will look like.
What you have to do is only to copy the generated HTML code and past it in your web site.
Reporting Errors
Note that the tool is still in beta which means it might have some issues. If you find any issue with the tool, please report it using the reporting form within the tool page.