In html

Define the code

Put your code inside template tag with colorcode attribute:

Attributes inside template with code:

Attribute "colorcode" - let colorCode to find this template

Attributes html,js,css,result - if not presented, main code will shown without tabs. If presented the tabs will shown by order ot attributes inside tag and by parameters inside attributes.

The parameters inside html,js,css,result are: active,full.
  • active - the tab will be active. By default only first tab is active.
  • full - the tab will be in full size. By default every tab resized.

In javaScript

  1. Include colorCode.js
  2. dom - may be dom id, template it self or empty (document)

  3. Run colorCode - new colorCode(dom)
You can customize style of colorcodes elements by - [colorcode] {..}

Customize colors

Second parameter in colorCode is colorsObj that allows to customize colors of code.
By default the colors are: