mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-01 17:38:38 +00:00
Highlight code in articles using highlight.js
This commit is contained in:
parent
11f15430ff
commit
b2e7b8b600
3 changed files with 12 additions and 1 deletions
8
app/Resources/static/themes/_global/js/highlight.js
Normal file
8
app/Resources/static/themes/_global/js/highlight.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import 'highlight.js/styles/atom-one-light.css';
|
||||
import * as hljs from 'highlight.js';
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
document.querySelectorAll('pre').forEach((node) => {
|
||||
hljs.highlightBlock(node);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue