Additional Info
Type
Package ID
Bugo:Highlighting
First Created
February 01, 2011, 07:55:41 AM
Last Updated
September 03, 2022, 02:49:12 AM

highlight.js for SMF v1.2.2 Hooks only

Syntax highlighting in messages.
Compatible With 2.1.1
Latest version v1.2.2
Downloads 4,307
Reviews 1
Rating 5/5
Subscribers 15
License BSD 3-Clause "New" or "Revised" License (View License)
Author(s)
This script highlights syntax in code examples on your forum.
It is very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.
Supported languages: HTML/XML, Javascript, CSS, PHP, Ruby, Perl, Python, C++, C#, Java, SQL, Bash, etc.


All supported languages and styles

How to use? Very simply!

[code]your code[/code]


Advanced using

[code=language]your code[/code]


One more way

[code]your code[/code]


If you want numbering to start from some other value than 1, you can specify a numbering offset:

[code]your code[/code]


Features:
  • You can choose code formatting scheme
  • You can choose font size within code blocks
  • Highlighting works automatically: finds blocks of code, detects a language, highlights it — you don't need to specify any language

Edit this CSS in /Themes/default/css/highlight.css to customize line numbers:
.hljs-ln-numbers {
    text-align: center;
    color: #f36;
    border-right: 1px solid #f36;
    vertical-align: top;
    min-width: 25px;
}

Available translations:
  • English
  • Russian
  • French
  • Spanish

Manual installation info
You have to register or login to be able to leave a review
Robox • September 03, 2022, 02:49:12 AM • 5/5
Works great on SMF 2.1.2, thanks a lot, it's amazing
Pages1
Advertisement: