cm-editor-syntax-highlight-obsidian icon indicating copy to clipboard operation
cm-editor-syntax-highlight-obsidian copied to clipboard

Expose syntax highlighting through an API for use by other plugins

Open MostlyArmless opened this issue 3 years ago • 0 comments

I use the obsidian-spaced-repetition plugin to make flashcards to study programming topics, but when the flashcard content is displayed by the other plugin it doesn't have any syntax highlighting. It would be great if this plugin had an API which I could call from over in the obsidian-spaced-repetition plugin to do something like syntaxHighlightApi.highlightMarkdown(codeFenceTextToHighlight) which would return some HTML with inline styles, perhaps. Just spitballing here.

Raw note content with the syntax highlighting working: image

What it looks like when rendered by the obsidian-spaced-repetition plugin as a flashcard: image

MostlyArmless avatar Oct 07 '22 21:10 MostlyArmless