Line focus plugin for Highlight.js

Overview

Highlight.js Focus Plugin

This plugin provide the ability to highlight a focused line when using Highlight.js

image

To use, first, register this plugin with addPlugin command:

hljs.addPlugin(new LineFocusPlugin({
    focusedStyle: {
        borderLeft: "2px solid #78e08f55",
        background: "#78e08f05",
        padding: "2px",
        paddingLeft: "10px",
    },
    unfocusedStyle: {
        borderLeft: "2px solid transparent",
        paddingLeft: "10px",
        opacity: "0.5",
        filter: "grayscale(1)"
    }
}));

Then in your code, or in your markdown source, add the language with the format:

<language>@focus=<lines>

For example:

js@focus=5,8:12,14
You might also like...

Zoom and pan plugin for Chart.js

chartjs-plugin-zoom A zoom and pan plugin for Chart.js = 3.0.0 For Chart.js 2.6.0 to 2.9.x support, use version 0.7.7 of this plugin. Panning can be

Jan 2, 2023

Chart.js plugin for more styling options

chartjs-plugin-style Chart.js plugin for more styling options This plugin requires Chart.js 2.6.0 or later. Installation You can download the latest v

Oct 27, 2022

Chart.js plugin for live streaming data

chartjs-plugin-streaming Chart.js plugin for live streaming data chartjs-plugin-streaming 2.x requires Chart.js 3.0.0 or later. If you need Chart.js 2

Dec 27, 2022

This plugin for Chart.js that makes your bar chart to 100% stacked bar chart.

This plugin for Chart.js that makes your bar chart to 100% stacked bar chart.

chartjs-plugin-stacked100 This plugin for Chart.js that makes your bar chart to 100% stacked bar chart. Requires Chart.js 3.x. Demo: https://y-takey.g

Jan 3, 2023

Chart.js plugin to create charts with a hand-drawn, sketchy, appearance

chartjs-plugin-rough Chart.js plugin to create charts with a hand-drawn, sketchy, appearance Version 0.2 requires Chart.js 2.7.0 or later, and Rough.j

Dec 1, 2022

Chart.js plugin to calculate and draw statistical linear, exponential, power, logarithmic, and polynomial regressions.

chartjs-plugin-regression Chart.js plugin to calculate and draw statistical linear, exponential, power, logarithmic, and polynomial regressions using

Dec 18, 2022

Draggable data points plugin for Chart.js

Draggable data points plugin for Chart.js

chartjs-plugin-dragdata.js Now compatible with Chart.js v3 🎉 Looking for a version compatible to Chart.js 2.9.x? Then visit the v2 branch! A plugin

Dec 18, 2022

Chart.js plugin to defer initial chart updates

Chart.js plugin to defer initial chart updates

Chart.js plugin to defer initial chart updates until the user scrolls and the canvas appears inside the viewport, and thus trigger the initial chart a

Nov 9, 2022

Chart.js plugin for Prometheus data loading

Chart.js plugin for Prometheus data loading

Welcome to chartjs-plugin-datasource-prometheus 👋 A Prometheus datasource for ChartJS. Dependencies: requires chart.js 2.7 or later. requires moment.

Dec 6, 2022
Owner
Huy
Huy
Progressive pie, donut, bar and line charts

Peity Peity (sounds like deity) is a jQuery plugin that converts an element's content into a mini <svg> pie, donut, line or bar chart. Basic Usage HTM

Ben Pickles 4.2k Jan 1, 2023
Create beautiful charts with one line of JavaScript

Chartkick.js Create beautiful charts with one line of JavaScript See it in action Supports Chart.js, Google Charts, and Highcharts Also available for

Andrew Kane 1.2k Jan 2, 2023
Create beautiful JavaScript charts with one line of React

React Chartkick Create beautiful JavaScript charts with one line of React See it in action Supports Chart.js, Google Charts, and Highcharts Quick Star

Andrew Kane 1.2k Dec 28, 2022
Create beautiful JavaScript charts with one line of Ruby

Chartkick Create beautiful JavaScript charts with one line of Ruby. No more fighting with charting libraries! See it in action Chartkick 4.0 was recen

Andrew Kane 6.1k Jan 8, 2023
TChart.js - simple and configurable Bar and Line Chart library in Javascript

TChart.js Simple and configurable Bar and Line Chart library in Javascript Description TChart.js is a canvas-based simple Javascript Bar and Line Char

null 4 Mar 3, 2021
The CCF Backstage Plugin is a tool to estimate energy use (kilowatt-hours) and carbon emissions (metric tons CO2e) from public cloud usage that is meant to be consumed as a plugin into a Backstage application

CCF Backstage Plugin Understand how your cloud usage impacts our environment and what you can do about it. This plugin brings the functionallity of th

Cloud Carbon Footprint 21 Nov 6, 2022
A plugin for the jQuery javascript library to generate small sparkline charts directly in the browser

jQuery Sparklines This jQuery plugin makes it easy to generate a number of different types of sparklines directly in the browser, using online a line

Gareth Watts 1.2k Jan 4, 2023
A Versatile and Expandable jQuery Plotting Plugin

jQPlot Pure JavaScript plotting plugin for jQuery. jqPlot home page: http://www.jqplot.com Users forum: http://groups.google.com/group/jqplot-users De

jqPlot 222 Sep 8, 2022
JQuery plugin for creating charts

JQuery Linechart JQuery plugin for building a linechart. Chart ruler completely on HTML/CSS/JS. Bar chart, calendar view visualisation. Diagram, graph

Kirill Stepkin 42 Oct 25, 2022
JQuery plugin for creating charts

JQuery Linechart JQuery plugin for building a linechart. Chart ruler completely on HTML/CSS/JS. Bar chart, calendar view visualisation. Diagram, graph

Kirill Stepkin 42 Oct 25, 2022