Basics
User Interface Components
The Advanced Codeblocks user interface is composed of the following components:
codebox
codebox title
menu with contained download links and help
codeblock with codeblock header and codeblock body
download codeblock button
copy to clipboard button
When editing a page, the Advanced Codeblocks interface changes like so:
macro parameters are shown on the right side
Terms
The Terms describe the different parts of your Advanced Codeblocks input. Your input is always compound of a config and a template.
config | A config contains your configuration. It is written in the INI file format. |
section [section] | A config contains one or multiple sections. Every section represents one codeblock and could get an arbitrarily name. The section name appears on a line by itself in square brackets. |
key name = value | A section contains one or multiple keys. Every key has a |
template or code | A template (or code) contains the content for your codeblocks. Write your template in any preferred programming language. Insert your template directly in Confluence or load your remote template from any source. |
variable ${name} | A variable is a placeholder in your template that will output the values you define in the keys of your config-block. The variable is composed of a dollar sign |
Your complete input could look like so:
Themes
The Advanced Codeblocks provides four different themes for a nice readable code. The default Theme is light-spring
. If you prefer a colorful dark mode or a colorless variant, switch to the edit mode
of the app and choose your preferred theme. Note that the same theme could differ slightly in different languages. The overview below is made with an Apache
example:
Dark Mode
The App supports the Confluence Dark Mode. The selected theme will also switch automatically to its dark pendant.
Bidi Character Support
The App supports display of Bidi Characters in a special way.
Troubleshooting
You might get errors when your input is incorrect, the remote file is too large or your license is expired. An error will look like so:
To fix the error state of the Advanced Codeblocks for Confluence as soon as possible, every error has an error key that is shown once you click on 'Error Key'. Please have a look at your appearing error key in the table below to get back on track. An error key for the Advanced Codeblocks looks like 400_ERROR_...
or similiar.
Error Keys and Description
400_ERROR_ | The macro config or code is empty. Cause This error means that you have not fully configured the macro yet. Not all required macro parameters have been filled out. Solution Check your input of:
|
400_ERROR_ | You are using an invalid syntax or formatting for the config. Cause This error means that your config is not written in the expectedly syntax. Solution Check your input of:
|
400_ERROR_ | The URL to the remote file is not valid or empty. Cause This error means that the remote url you are using is not valid. Solution Check the URL you are using. You could enter the URL directly in the browser to see if you can navigate to the desired file. Maybe there are some special chars that need to be URL Encoded, whitespaces or any other invalid characters. |
500_ERROR_ | There has been an error downloading the remote file. Cause This error means that while downloading the remote file an HTTP Error occured. Solution Check the following cases:
|
200_INFO_ | Your are currently working on an unsaved page that is in draft-mode. That means the page is new and was never saved before. Cause There might be no macro preview available for content in draft mode. Solution Please save the page first, then the macro preview will be available. |
500_ERROR_ | An unexpected error occured that was catched in the app-frontend. Cause When an unexpected error occurs that cannot be handled by the app, then it is the last resort to display it to the user. Solution Please open a ticket at the service desk with a screenshot of the problem. |
500_ERROR_ | Your license for Advanced Codeblocks for Confluence is not valid. Cause The app license is invalid. Solution Please use the 'Buy' or 'Renew' button to buy or renew your license. |
If you are lost after all, issue a request in the codeclou Service Desk.
Syntax highlighting
To enforce syntax highlighting for a specific language, switch to the edit mode of the macro and choose your language from over 150 different programming languages.
Supported Languages
The supported languages for code highlighting are currently:
1C ABNF Access logs Ada ARM Assembly AVR Assembler ActionScript Apache AppleScript AsciiDoc AspectJ AutoHotkey AutoIt Awk Axapta Bash Basic BNF Brainf*** C# C++ C/AL Cache Object Script CMake Coq CSP CSS Cap n Proto Ceylon Clojure Clojure REPL CoffeeScript Crmsh Crystal D DNS Zone file DOS .bat Dart Delphi Diff Django Dockerfile dsconfig DTS (Device Tree) Dust EBNF Elixir Elm ERB (Embedded Ruby) Erlang Erlang REPL Excel F# FIX Fortran G-code (ISO 6983) Gams GAUSS Gherkin Go Golo GLSL Gradle Groovy HTML, XML HTTP Haml Handlebars Haskell Haxe Hy Ini Inform 7 Intel x86 Assembly IRPF90 Java JavaScript JSON Julia Kotlin Lasso LDIF Leaf Less Lisp LiveCode LiveScript Lua Makefile Markdown Mathematica Matlab Maxima MEL Mercury Mizar Mojolicious Monkey Moonscript N1QL NSIS Nginx Nimrod Nix Objective C OCaml OpenGL Shading Language OpenSCAD Oracle Rules Language Oxygene Parser3 Perl pf PHP Pony PowerShell Processing Prolog Protocol Buffers Puppet Python Python profile Q QML R RenderMan RIB RenderMan RSL Roboconf Ruby Rust Scala Scheme Scilab SCSS Shell Smali Smalltalk SML SQL Stan Stata STEP Part 21 (ISO 10303-21) Stylus SubUnit Swift Tcl Test Anything Protocol TeX Thrift TP Twig TypeScript Vala VB.NET VBScript VBScript in HTML Verilog VHDL Vim Script XL XML XQuery Zephir