thanks for the plugin. If a note is open in edit mode with code when obsidian starts it does not work (shows all white text) until toggling from edit->preview->edit.
You can trigger an update on the active leaf with something like this:
const view = this.app.workspace.activeLeaf.view as MarkdownView;
const editor = view.sourceMode.cmEditor;
// editor.refresh(); // DOESNT DO ANYTHING
editor.setOption("mode", "css");
editor.setOption("mode", "markdown");
i.e. by swapping the mode from markdown and then back. Maybe this can be applied in the onload()?
thanks for the plugin. If a note is open in edit mode with code when obsidian starts it does not work (shows all white text) until toggling from edit->preview->edit.
You can trigger an update on the active leaf with something like this:
i.e. by swapping the mode from markdown and then back. Maybe this can be applied in the onload()?