Giter VIP home page Giter VIP logo

syntax-highlighter's Introduction

logo

Syntax Highlighter

A lightweight, easy-to-use and framework agnostic syntax highlighter for your code examples(snippets) in web applications

License Patreon

npm npm

Support Server


Table of Contents

Why yet another code highlighter?

There are many syntax highlighters available already but most of those are either complex to setup or front end framework specific. @favware/syntax-highlighter-core is built using StencilJS. You can use it everywhere, i.e. Angular, React, Vue, any framework, No Framework!

This is an adaptation of snippet-highlight from rahulbhooteshwar

Features

  • Uses PrismJS for syntax highlighting
  • Light and Dark mode supported
  • Copy code support
  • Supports many languages, see Supported Languages
  • Will default to using Fira Code as font family
    • The library first falls back to popular fonts such as Cascadia Code and Meslo NGF if it isn't available. If these are also not available it will go through various more popular coding fonts, ending in monospace

Demos

Angular

Edit Button

React

Edit Button

Vue

Edit Button

Supported Languages

To limit the size of this library a selection has been made from all langauges supported by PrismJS. The chosen languages are those that we consider the most popular / common. If you want to see another languages supported you're always free to open an issue

javascript, typescript, asciidoc, autohotkey, autoit, bash, batch,
 
c, clike, clojure, coffeescript, cpp, csharp, csp, css, dart,
 
diff, docker, elixir, gherkin, git, go, graphql, groovy, http,
 
ini, java, json, jsx, kotlin, less, lua, makefile, markdown,
 
nginx, objectivec, powershell, python, ruby, rust, sass, scala,
 
scss, sql, swift, tsx, vim, visual-basic, wasm, wiki, yaml

Screenshots

Dark Mode

Light Mode

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.