Just as title, Is it possible to change highlight.js theme?
I've tried looking at code and my guess is "no" because of this
// In bodyOnly mode, the rendered Markdown is returned without the wrapper DIV
bodyOnly: false,
// In splitted mode, the CSS and HTML will be returned in separate properties.
// In non-splitted mode, CSS and HTML will be merged in the same document.
splitted: false,
// When this is true, all assets such as CSS or JS are returned as external
// files. Otherwise some of them might be in the cssStrings property.
externalAssetsOnly: false,
postMessageSyntax: 'postMessage',
highlightedKeywords: [],
codeTheme: 'atom-one-light.css',
theme: Object.assign({}, defaultNoteStyle, theme),
plugins: {},
audioPlayerEnabled: this.pluginEnabled('audioPlayer'),
videoPlayerEnabled: this.pluginEnabled('videoPlayer'),
pdfViewerEnabled: this.pluginEnabled('pdfViewer'),
}, options);
// The "codeHighlightCacheKey" option indicates what set of cached object should be
// associated with this particular Markdown body. It is only used to allow us to
Thank you!
You can always edit rendered markdown in userstyle.css
to change different colours to your liking.
1 Like
This make sense, I think that by inserting a highlight.js theme CSS code in the userstyle.css
file should be effective in overwriting the default one. I will give this a try.
Thank you!
Yes it worked!
Be careful and look how the theme has implemented classes like .hljs
since some may conflict with the default atom-one-light.css
.
system
Closed
15 June 2021 04:03
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.