obsidian-plugin-dynamic-toc icon indicating copy to clipboard operation
obsidian-plugin-dynamic-toc copied to clipboard

Funky Live Preview

Open Aidurber opened this issue 3 years ago • 2 comments

Live Preview has done a number on this plugin. Code Blocks kinda work but things get weird when you start having split panes. It behaves like a shared instance of the post processor between leafs, in version 12 each leaf would have its own instance. All issues due to Live Preview are on hold, the recommended course of action is to build a Code Mirror 6 extension. I estimate this taking a significant amount of time and completely rebuilding this plugin. That's not something I can justify for a hobby project.

The post processor isn't guaranteed to run inside live preview. I can get it to run if I have a codeblock processor. Go figure.

Because of the way content is output in code mirror, a renderer such as [TOC] doesn't appear in the document like that. In full preview mode [TOC] can be found in the document verbatim, in live preview there is some code mirror shenanigans. See below: image

Image of bug image

Conclusion

I'm unsure how to fix this, live preview has broken this plugin in a couple of different ways. I'm going to let the dust settle on live preview and see what solutions the community comes up with.

Aidurber avatar Jan 02 '22 17:01 Aidurber

I'll be watching closely this issue and a possible fix, as your plugin is amazing, used by me all the time, but Live Preview cracks TOC the way you presented

marcinbojko avatar Jan 15 '22 19:01 marcinbojko

@Aidurber Any hope for fixing this so that Dynamic TOC and Live Preview happily co-exist?

frankhinek avatar Aug 05 '22 13:08 frankhinek