I am using TiddlyWiki version 5.1.13. I have added the highlight plugin (version 5.1.13) which uses highlight.js (version 8.8.0).
In a tiddler I successfully highlight XML like this:
```xml
<html>
<body>
</body>
</html>
```
How can I change the highlight style / theme to one of highlight.js various styles? (Highlight.js styles)
When you add Highlight.js to your site's directory, it contains a directory called styles
. Inside that directory you have styles for all the themes available with Highlight.js.
To switch to a different theme, simply switch this line
<link rel="stylesheet" href="/path/to/styles/default.css">
to something like this:
<link rel="stylesheet" href="/path/to/styles/pick-theme-name-here.css">
Here is the URL to the styles directory in the highlight.js repo.
I found it useful to locate the name of the Vs 2015
theme which isn't vs-2015
but rather vs2015
.
I'm importing the styles from a CDN:
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/styles/default.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/styles/vs2015.min.css">
Also, for the record, Vs 2015 is very similar to VS Code's Dark+ (default dark)
theme. That's the default theme that ships with VS Code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With