How to customize codeblocks in Obsidian reading mode?

841 Views Asked by At

I am working on an Obsidian plugin which should work in editor mode and reading mode as well. I have finished all functionality in editing mode, and I wanted to start working on the reading mode. The plugin basically adds functionality to set different colors (highlight, background, active line etc.) for code blocks, add a gutter and a header. In editing mode everything is working fine, but I can't figure it out, how to change the document in reading mode? Can I apply my View somehow, or do I have to make the same changes in reading mode as well? If yes, then how? The problem is that if I want to change for example the background color for a specific line in a codeblock, then it gets overwritten when the syntax highlighting is applied. The syntax highlighting, I would not want to disable, because that would not make any sense.

I would really appreciate any help!

0

There are 0 best solutions below