All Projects β†’ EnlighterJS β†’ Enlighterjs

EnlighterJS / Enlighterjs

Licence: mpl-2.0
πŸ”† an open source syntax highlighter written in pure javascript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Enlighterjs

Zsh Syntax Highlighting Filetypes
zsh syntax highlighting with dircolors in realtime
Stars: ✭ 130 (-65.7%)
Mutual labels:  syntax-highlighting, highlighting
Highlight.js
JavaScript syntax highlighter with language auto-detection and zero dependencies.
Stars: ✭ 19,312 (+4995.51%)
Mutual labels:  syntax-highlighting, highlighting
kirby-highlight
Themeable server-side syntax highlighting for Kirby
Stars: ✭ 14 (-96.31%)
Mutual labels:  syntax-highlighting, highlighting
6502 Npp Syntax
Notepad++ Syntax Highlighting for 6502 Assembly (and NESASM)
Stars: ✭ 17 (-95.51%)
Mutual labels:  syntax-highlighting, highlighting
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (-78.36%)
Mutual labels:  syntax-highlighting, highlighting
Nord Sublime Text
An arctic, north-bluish clean and elegant Sublime Text theme.
Stars: ✭ 109 (-71.24%)
Mutual labels:  syntax-highlighting, highlighting
shikijs
A JavaScript Library for Syntax Highlighting with Awesome themes
Stars: ✭ 21 (-94.46%)
Mutual labels:  syntax-highlighting, javascript-library
Vue Prism
Simple Vue.js Syntax highlighting with Prism.js
Stars: ✭ 43 (-88.65%)
Mutual labels:  syntax-highlighting, javascript-library
6502-npp-syntax
Notepad++ Syntax Highlighting for 6502 Assembly (and NESASM)
Stars: ✭ 21 (-94.46%)
Mutual labels:  syntax-highlighting, highlighting
CodeView
Android Library to make it easy to create an Code editor or IDE that support any languages and themes, with auto complete, auto indenting, snippets and more features
Stars: ✭ 254 (-32.98%)
Mutual labels:  syntax-highlighting, highlighting
Codeview Android
Display code with syntax highlighting ✨ in native way.
Stars: ✭ 748 (+97.36%)
Mutual labels:  syntax-highlighting, highlighting
splash
🌊 Highlight source code embedded in HTML with a splash of color
Stars: ✭ 19 (-94.99%)
Mutual labels:  syntax-highlighting, highlighting
rdocsyntax
Syntax highlighting for R HTML documentation
Stars: ✭ 20 (-94.72%)
Mutual labels:  syntax-highlighting, highlighting
sublime-coconut
Coconut syntax highlighting for Sublime Text and VSCode.
Stars: ✭ 18 (-95.25%)
Mutual labels:  syntax-highlighting, highlighting
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (-84.17%)
Mutual labels:  syntax-highlighting, highlighting
core
🌈 light, fast, and easy to use, dependencies free javascript syntax highlighter, with automatic language detection
Stars: ✭ 40 (-89.45%)
Mutual labels:  syntax-highlighting, highlighting
Rainbow csv
🌈Rainbow CSV - Vim plugin: Highlight columns in CSV and TSV files and run queries in SQL-like language
Stars: ✭ 337 (-11.08%)
Mutual labels:  syntax-highlighting
Jsuites
jSuites is a collection of lightweight common required javascript web components. It is composed of fully responsive vanilla plugins to help you bring the best user experience to your projects, independent of the platform. Same JS codebase across different platforms.
Stars: ✭ 365 (-3.69%)
Mutual labels:  javascript-library
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (-11.35%)
Mutual labels:  javascript-library
Nodepolus
NodePolus is a JavaScript library containing multiple implementations of the Among Us network protocol.
Stars: ✭ 331 (-12.66%)
Mutual labels:  javascript-library

Build Status

Quickstart | Languages | Themes | Website

EnlighterJS3

EnlighterJS, an open source syntax highlighter written in pure javascript

Using it can be as simple as adding a single script and style to your website, choosing the elements you wish to highlight, and EnlighterJS takes care of the rest.

Appearance

Related

Features

KEY FEATURES

  • Designed to work in all modern browsers (not server-side)
  • Encapsulated, standalone library - zero dependencies (no MooTools, no jQuery!)
  • 40 supported languages/formats
  • 12 high quality themes
  • Inline Syntax highlighting
  • Codegroups to displays multiple code-blocks within a tab-pane
  • Point out special lines of code
  • Ultra small footprint: 45KB JS (all languages) + 10KB CSS (single theme; all themes 60KB)
  • Highlight all codeblocks on your page with a single command

TECHNICAL FEATURES

  • Ultrafast Tokenizer Engine based on priorized regular expressions
  • Second-Stage-Tokenizer for optimized performance
  • Full customizable themes written in less
  • Themes available as single css files to reduce footprint
  • Views based on JSX
  • Minimal, embedded DOM library
  • gulp based build system
  • ES6 code transpiled via babel and build with rollup.js

Languages

  • ABAP (abap)
  • Apache HTTPD (apache)
  • Assembly (assembly, asm)
  • AVR Assembly (avrassembly, avrasm)
  • C/C++ (c,cpp, c++)
  • C# (csharp)
  • CSS (css)
  • Cython (cython)
  • CordPro (cordpro)
  • diff (diff)
  • Dockerfile (docker, dockerfile)
  • Generic (generic, standard) - default highlighting scheme
  • Groovy (groovy)
  • Go (go, golang)
  • HTML (html)
  • Ini (ini, conf)
  • Java (java)
  • Javascript (js, javascript, jquery, mootools, ext.js)
  • JSON (json)
  • JSX (jsx)
  • Kotlin (kotlin)
  • LATEX (latex)
  • LESS (less)
  • lighttpd (lighttpd)
  • LUA (lua)
  • MariadDB (mariadb)
  • Markdown (gfm, md, markdown)
  • Matlab/Octave (octave, matlab)
  • MSSQL (mssql)
  • NGINX (nginx)
  • NSIS (nsis)
  • Oracle Database (oracledb)
  • PHP (php)
  • Powerhsell (powershell)
  • Prolog (prolog)
  • Python (py, python)
  • PureBasic (purebasic, pb)
  • QML (qml)
  • R (r)
  • RAW (raw) - raw code without highlighting with EnlighterJS container styles!
  • RouterOS/SwitchOS (routeros)
  • Ruby (ruby)
  • Rust (rust)
  • Scala (scala)
  • SCSS (scss, sass)
  • Shellscript (shell, bash)
  • Generic SQL (sql)
  • Squirrel (squirrel)
  • Swift (swift)
  • Typescript (typescript)
  • VHDL (vhdl)
  • VisualBasic (visualbasic, vb)
  • Verilog (verilog)
  • XML (xml, html)
  • YAML (yaml)

Themes

  • Enlighter (enlighter, standard) - Enlighter`s default Theme
  • Classic (classic) - SyntaxHighlighter inspired
  • Bootstrap (bootstrap4) - Bootstrap 4 inpired themes, high contrast
  • Beyond (beyond) - BeyondTechnology Theme
  • Godzilla (godzilla) - A MDN inspired Theme
  • Eclipse (eclipse) - Eclipse inspired
  • MooTwo (mootwo) - Inspired by the MooTools Website
  • Droide (droide) - Modern, minimalistic
  • Minimal (minimal) - Bright, High contrast
  • Atomic (atomic) - Dark, Colorful
  • Dracula (dracula) - Dark, using official draculatheme colorscheme
  • Rowhammer (rowhammer) - Light, Transparent, divided rows

Quickstart

  1. Download latest EnlighterJS release
  2. Copy the files from the dist/ directory to your public html location
  3. Include the CSS+JS files
  4. Tag the codeblocks on your page (e.g. pre tags with data-enlighter-language attribute)
  5. Initialize highlighting

Minimal Example

This is a minimalistic example how to highlight sourcecode with EnlighterJS. The working example (valid js+css paths) is available within the example directory.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>EnlighterJS Test</title>

    <!-- EnlighterJS Resources !-->
    <link rel="stylesheet" href="enlighterjs.min.css" />
</head>
<body>

    <main>
        <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore 
            et dolore <code>window.addEvent('domready', async (a,b) => {});</code> magna aliquyam erat.
        </p>

        <!-- Code to hghlight !-->
        <pre data-enlighter-language="less">
// buttons used in codegroups + toolbar
.enlighter-btn{
    display: inline-block;
    margin: 0px 5px 0px 5px;
    padding: 3px 5px 3px 5px;
    border: solid 1px #333333;
    background-color: #f0f0f0;
    cursor: pointer;
}

// buttons
.enlighter-btn-raw{
    background-image: data-uri('icons/enlighter_code.svg');
}

.enlighter-btn-window{
    background-image: data-uri('icons/enlighter_rawcode.svg');
}

.enlighter-btn-website{
    background-image: data-uri('icons/enlighter_icon_white.svg');
}
        </pre>

    </main>

    <script type="text/javascript" src="enlighterjs.min.js"></script>
    <script type="text/javascript">
        // INIT CODE - simple page-wide initialization based on css selectors
        // - highlight all pre + code tags (CSS3 selectors)
        // - use javascript as default language
        // - use theme "enlighter" as default theme
        // - replace tabs with 2 spaces
        EnlighterJS.init('pre', 'code', {
                language : 'javascript',
                theme: 'enlighter',
                indent : 2
        });
    </script>
</body>
</html>

Contribution

EnlighterJS is OpenSource and managed on GitHub - if you like, you're welcome to contribute! To simplify the release and quality control process, please follow these remarks:

  1. One Enhancement ==> One Commit (don't merge a bunch of changes in a single commit!)
  2. Only commit changes to the src/ or examples/ directory. Otherwise your request will be rejected
  3. Discuss larger project changes with the Maintainer before implementing
  4. Use GitHub for question, bugreports and discussions

License

EnlighterJS is OpenSource and licensed under the Terms of Mozilla Public License 2.0. You're welcome to contribute

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].