Introducing highlightjs-turbolinks, a turbolinks 5 compatible fork of highlight.js
Highlightjs-turbolinks is a Turbolinks 5 compatible fork of Highlight.js, and is up to date with v9.12.0.
https://github.com/ajwann/highlightjs-turbolinks
https://www.npmjs.com/package/highlightjs-turbolinks
To make Highlight.js compatible with Turbolinks 5, two event listeners have been added to initHighlightingOnLoad, which listen for the turbolinks:load and turbolinks:render events.
The original event listeners used by initHighlightingOnLoad have been left in place. They listen for the DOMContentLoaded and load events. This allows highlight-js-turbolinks to be compatible with applications that use turbolinks, and also compatable with applications that do not. Therefore if you ever choose to disable or remove turbolinks from your application, you may continue to use highlightjs-turbolinks.
Post a comment