{"id":13511889,"url":"https://github.com/EnlighterJS/EnlighterJS","last_synced_at":"2025-03-30T21:31:12.405Z","repository":{"id":7935354,"uuid":"9325738","full_name":"EnlighterJS/EnlighterJS","owner":"EnlighterJS","description":":high_brightness: an open source syntax highlighter written in pure javascript","archived":false,"fork":false,"pushed_at":"2024-04-30T04:25:52.000Z","size":6358,"stargazers_count":1042,"open_issues_count":28,"forks_count":215,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-03-24T14:13:31.871Z","etag":null,"topics":["enlighterjs","highlighting","javascript","javascript-library","syntax-highlighter","syntax-highlighting","theme-support"],"latest_commit_sha":null,"homepage":"https://enlighterjs.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EnlighterJS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-09T16:21:50.000Z","updated_at":"2025-03-02T05:41:24.000Z","dependencies_parsed_at":"2024-06-19T17:11:34.276Z","dependency_job_id":"a9cb073b-1464-44d8-bbbf-1e6671ae8cdb","html_url":"https://github.com/EnlighterJS/EnlighterJS","commit_stats":{"total_commits":221,"total_committers":15,"mean_commits":"14.733333333333333","dds":0.330316742081448,"last_synced_commit":"a0e3a9be4b6a09a5506567fc18f456a177eeed31"},"previous_names":["andidittrich/enlighterjs"],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnlighterJS%2FEnlighterJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnlighterJS%2FEnlighterJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnlighterJS%2FEnlighterJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnlighterJS%2FEnlighterJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnlighterJS","download_url":"https://codeload.github.com/EnlighterJS/EnlighterJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246385154,"owners_count":20768663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["enlighterjs","highlighting","javascript","javascript-library","syntax-highlighter","syntax-highlighting","theme-support"],"created_at":"2024-08-01T03:01:16.817Z","updated_at":"2025-03-30T21:31:12.395Z","avatar_url":"https://github.com/EnlighterJS.png","language":"JavaScript","readme":"[![Build Status](https://travis-ci.org/EnlighterJS/EnlighterJS.svg?branch=master)](https://travis-ci.org/EnlighterJS/EnlighterJS)\n\n[Quickstart](#quickstart) | [Documentation](https://github.com/EnlighterJS/docs) | [Languages](#languages) | [Themes](#themes) | [Website](https://enlighterjs.org) \n\nEnlighterJS3\n====================================================================\n\n**EnlighterJS, an open source syntax highlighter written in pure javascript**\n\nUsing 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.\n\n![Appearance](assets/enlighterjs_bootstrap4.png)\n\nRelated\n----------------------------------------------\n\n* [Documentation](https://github.com/EnlighterJS/docs)\n* [Website](https://enlighterjs.org)\n* [Developer Guide](https://github.com/EnlighterJS/documentation/blob/master/development/README.md)\n* [Examples](examples/)\n* [EnlighterJS for WordPress](https://wordpress.org/plugins/enlighter/) - The official EnlighterJS plugin for WordPress | [Repository](https://github.com/EnlighterJS/Plugin.WordPress)\n* [EnlighterJS for TinyMCE Editor](https://tinymce.enlighterjs.org) - The official EnlighterJS plugin for TinyMCE Visual Editor | [Repository](https://github.com/EnlighterJS/Plugin.TinyMCE)\n* [EnlighterJS for Gutenberg Editor](https://wordpress.org/plugins/enlighter/) - The official EnlighterJS plugin for WordPress Gutenberg Editor| [Repository](https://github.com/EnlighterJS/Plugin.Gutenberg)\n\nFeatures\n----------------------------------------------\n\n#### KEY FEATURES ####\n\n* Designed to work in **all modern browsers** (not server-side)\n* Encapsulated, standalone library - **zero dependencies** (no MooTools, no jQuery!)\n* 40 supported languages/formats\n* 12 high quality themes\n* Inline Syntax highlighting\n* Codegroups to displays multiple code-blocks within a tab-pane\n* Point out special lines of code\n* Ultra small footprint: `45KB JS` (all languages) + `10KB CSS` (single theme; all themes 60KB)\n* Highlight all codeblocks on your page with a single command\n\n#### TECHNICAL FEATURES ####\n\n* Ultrafast Tokenizer Engine based on priorized regular expressions\n* Second-Stage-Tokenizer for optimized performance \n* Full customizable themes written in [less](http://lesscss.org/)\n* Themes available as single css files to reduce footprint\n* Views based on [JSX](https://reactjs.org/docs/introducing-jsx.html)\n* Minimal, embedded DOM library\n* [gulp](https://gulpjs.com/) based build system\n* ES6 code transpiled via [babel](https://babeljs.io/) and build with [rollup.js](https://rollupjs.org/guide/en)\n\n#### Languages ####\n\n* **ABAP** (abap)\n* **Apache HTTPD** (apache)\n* **Assembly** (assembly, asm)\n* **AVR Assembly** (avrassembly, avrasm)\n* **Windows Batch/Bat** (bat,batch,cmd)\n* **C/C++** (c,cpp, c++)\n* **C#** (csharp)\n* **CSS** (css)\n* **Cython** (cython)\n* **CordPro** (cordpro)\n* **diff** (diff)\n* **Dockerfile** (docker, dockerfile)\n* **Generic** (generic, standard) - default highlighting scheme\n* **Groovy** (groovy)\n* **Go** (go, golang)\n* **HTML** (html)\n* **Ini** (ini, conf)\n* **Java** (java)\n* **Javascript** (js, javascript, jquery, mootools, ext.js)\n* **JSON** (json)\n* **JSX** (jsx)\n* **Kotlin** (kotlin)\n* **LATEX** (latex)\n* **LESS** (less)\n* **lighttpd** (lighttpd)\n* **LUA** (lua)\n* **MariaDB** (mariadb)\n* **Markdown** (gfm, md, markdown)\n* **Matlab/Octave** (octave, matlab)\n* **MSSQL** (mssql)\n* **NGINX** (nginx)\n* **NSIS** (nsis)\n* **Oracle Database** (oracledb)\n* **PHP** (php)\n* **Powerhsell** (powershell)\n* **Prolog** (prolog)\n* **Python** (py, python)\n* **PureBasic** (purebasic, pb)\n* **QML** (qml)\n* **R** (r)\n* **RAW** (raw) - raw code without highlighting with EnlighterJS container styles!\n* **RouterOS/SwitchOS** (routeros)\n* **Ruby** (ruby)\n* **Rust** (rust)\n* **Scala** (scala)\n* **SCSS** (scss, sass)\n* **Shellscript** (shell, bash)\n* **Generic SQL** (sql)\n* **Squirrel** (squirrel)\n* **Swift** (swift)\n* **Typescript** (typescript)\n* **VHDL** (vhdl)\n* **VisualBasic** (visualbasic, vb)\n* **Verilog** (verilog)\n* **XML** (xml, html)\n* **YAML** (yaml)\n\n#### Themes ####\n\n* **Enlighter** (enlighter, standard) - Enlighter`s default Theme\n* **Classic** (classic) - SyntaxHighlighter inspired\n* **Bootstrap** (bootstrap4) - Bootstrap 4 inpired themes, high contrast\n* **Beyond** (beyond) - BeyondTechnology Theme\n* **Godzilla** (godzilla) - A MDN inspired Theme\n* **Eclipse** (eclipse) - Eclipse inspired\n* **MooTwo** (mootwo) - Inspired by the MooTools Website\n* **Droide** (droide) - Modern, minimalistic\n* **Minimal** (minimal) - Bright, High contrast\n* **Atomic** (atomic) - Dark, Colorful\n* **Dracula** (dracula) - Dark, using official [draculatheme](https://draculatheme.com/) colorscheme\n* **Rowhammer** (rowhammer) - Light, Transparent, divided rows\n\nQuickstart\n----------------------------------------------\n\n1. Download latest [EnlighterJS release](https://github.com/EnlighterJS/EnlighterJS/releases)\n2. Copy the files from the `dist/` directory to your public html location\n3. Include the CSS+JS files\n4. Tag the codeblocks on your page (e.g. `pre` tags with `data-enlighter-language` attribute)\n5. Initialize highlighting\n\n### Minimal Example ###\n\nThis is a minimalistic example how to highlight sourcecode with EnlighterJS. The working example (valid js+css paths) is available within the [example directory](examples/).\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"utf-8\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1\" /\u003e\n    \u003ctitle\u003eEnlighterJS Test\u003c/title\u003e\n\n    \u003c!-- EnlighterJS Resources !--\u003e\n    \u003clink rel=\"stylesheet\" href=\"enlighterjs.min.css\" /\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\n    \u003cmain\u003e\n        \u003cp\u003eLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore \n            et dolore \u003ccode\u003ewindow.addEvent('domready', async (a,b) =\u003e {});\u003c/code\u003e magna aliquyam erat.\n        \u003c/p\u003e\n\n        \u003c!-- Code to hghlight !--\u003e\n        \u003cpre data-enlighter-language=\"less\"\u003e\n// buttons used in codegroups + toolbar\n.enlighter-btn{\n    display: inline-block;\n    margin: 0px 5px 0px 5px;\n    padding: 3px 5px 3px 5px;\n    border: solid 1px #333333;\n    background-color: #f0f0f0;\n    cursor: pointer;\n}\n\n// buttons\n.enlighter-btn-raw{\n    background-image: data-uri('icons/enlighter_code.svg');\n}\n\n.enlighter-btn-window{\n    background-image: data-uri('icons/enlighter_rawcode.svg');\n}\n\n.enlighter-btn-website{\n    background-image: data-uri('icons/enlighter_icon_white.svg');\n}\n        \u003c/pre\u003e\n\n    \u003c/main\u003e\n\n    \u003cscript type=\"text/javascript\" src=\"enlighterjs.min.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        // INIT CODE - simple page-wide initialization based on css selectors\n        // - highlight all pre + code tags (CSS3 selectors)\n        // - use javascript as default language\n        // - use theme \"enlighter\" as default theme\n        // - replace tabs with 2 spaces\n        EnlighterJS.init('pre', 'code', {\n                language : 'javascript',\n                theme: 'enlighter',\n                indent : 2\n        });\n    \u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nContribution\n------------\n\nEnlighterJS is OpenSource and managed on [GitHub](https://github.com/EnlighterJS/EnlighterJS) - if you like, you're welcome to contribute!\nTo simplify the release and quality control process, please follow these remarks:\n\n1. **One Enhancement** _==\u003e_ **One Commit** (don't merge a bunch of changes in a single commit!)\n2. Only commit changes to the `src/` or `examples/` directory. Otherwise your request will be rejected\n3. Discuss larger project changes with the Maintainer **before implementing**\n4. Use GitHub for question, bugreports and discussions\n\nLicense\n----------------------------------------------\n\nEnlighterJS is OpenSource and licensed under the Terms of [Mozilla Public License 2.0](https://opensource.org/licenses/MPL-2.0). You're welcome to [contribute](docs/CONTRIBUTING.md)\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEnlighterJS%2FEnlighterJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FEnlighterJS%2FEnlighterJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FEnlighterJS%2FEnlighterJS/lists"}