Socket
Socket
Sign inDemoInstall

highlightjs-apex

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highlightjs-apex

Apex Language of Salesforce highlighting plugin for highlight.js


Version published
Weekly downloads
443
Maintainers
1
Weekly downloads
 
Created
Source

Apex - a language grammar for the Salesforce Platform

Demo

The below screenshot was captured from a demo webpage after dropping highlight.min.js to a dist folder. (Code taken from Salesforce Trigger Framework and Highlight Java example code) Demo

Usage

Simply include the Highlight.js library in your webpage, then load this module.

Static website or simple usage

Simply load this module after loading Highlight.js. You'll use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/highlightjs-apex/dist/apex.min.js"></script>
<link rel="stylesheet" href="/path/to/highlightjs-apex/demo/highlight.css" />
<script type="text/javascript">
  hljs.highlightAll();
</script>

For more details of the usage see Highlight.js main page.

With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.

var hljs = require('highlight.js');
var hljsApexTxt = require('highlightjs-apex');

hljs.registerLanguage("apex", hljsApexTxt);
hljs.highlightAll();

License

Highlight.js is released under the BSD 3-Clause License. See LICENSE file for details.

Author

David Schach

Contribution

Feel free to create issues or (even better) pull requests.

Keywords

FAQs

Package last updated on 01 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc