jSyntax.js 1.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package jSyntax.js --version 1.4.0
NuGet\Install-Package jSyntax.js -Version 1.4.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="jSyntax.js" Version="1.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add jSyntax.js --version 1.4.0
#r "nuget: jSyntax.js, 1.4.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install jSyntax.js as a Cake Addin
#addin nuget:?package=jSyntax.js&version=1.4.0

// Install jSyntax.js as a Cake Tool
#tool nuget:?package=jSyntax.js&version=1.4.0

Syntax.js v1.4.0

Tweet npm nuget license discussions Welcome coded by William Troup

A lightweight, and easy-to-use, JavaScript library for code syntax highlighting!

What features does Syntax.js have?

  • Zero-dependencies and extremely lightweight!
  • Full API available via public functions.
  • Fully styled in CSS/SASS (including the buttons) and compatible with the Bootstrap library.
  • Full CSS theme support (using :root variables).
  • Coping and Printing support is available via action buttons.
  • Custom triggers for actions (when elements are rendered, keywords are clicked, etc).
  • 12 of the most popular languages built in by default (you can add your own easily if yours is not supported by default).
  • Unknown language support (renders the display, but does not highlight any syntax).

What browsers are supported?

All modern browsers (such as Google Chrome, FireFox, and Opera) are fully supported.

What are the most recent changes?

To see a list of all the most recent changes, click here.

How do I get started?

To get started using Syntax.js, do the following steps:

1. Prerequisites:

Make sure you include the "DOCTYPE html" tag at the top of your email, as follows:

<!DOCTYPE html>

2. Include Files:

<link rel="stylesheet" href="dist/syntax.js.css" />
<script src="dist/syntax.js"></script>
<script src="dist/languages/syntax.javascript.js"></script>

3. Create DOM Container:

<div data-syntax-language="javascript">
    var something = true;

    if ( something ) {
        console.log( "Output is written." ); // Comment
        
        /* Multi-line
        comment */
    }
</div>

<code data-syntax-language="javascript" data-syntax-options="{ 'showCopyButton': false }">
    <pre>
        var something = true;

        if ( something ) {
            console.log( "Output is written." ); // Comment
            
            /* Multi-line
            comment */
        }
    </pre>
</code>

To see a list of all the available options you can use for "data-syntax-options", click here.

To see a list of all the available custom triggers you can use for "data-syntax-options", click here.

4. Finishing Up:

That's it! Nice and simple. Please refer to the code if you need more help (fully documented).

How do I go about customizing Syntax.js?

To customize, and get more out of Syntax.js, please read through the following documentation.

1. Public Functions:

To see a list of all the public functions available, click here.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.5.0 128 3/29/2024
2.4.3 98 2/26/2024
2.4.2 94 2/6/2024
2.4.1 143 1/18/2024
2.4.0 123 1/15/2024
2.3.1 119 1/4/2024
2.3.0 119 12/30/2023
2.2.0 137 12/29/2023
2.1.1 137 12/26/2023
2.1.0 122 12/20/2023
2.0.1 114 12/19/2023
2.0.0 81 12/18/2023
1.9.0 109 12/15/2023
1.8.2 119 12/13/2023
1.8.1 95 12/13/2023
1.8.0 108 12/11/2023
1.7.3 98 12/10/2023
1.7.2 149 12/10/2023
1.7.1 130 12/10/2023
1.7.0 103 12/9/2023
1.6.2 83 12/8/2023
1.6.1 124 12/8/2023
1.6.0 92 12/7/2023
1.5.1 141 12/6/2023
1.5.0 119 12/6/2023
1.4.0 127 12/5/2023
1.3.0 124 12/5/2023
1.2.0 177 12/4/2023
1.1.0 134 12/2/2023
1.0.0 122 12/1/2023
0.8.0 111 11/30/2023
0.7.0 114 11/28/2023