After updating to the latest release, Obsidian failed to open all of my files except for canvas. The error message says: Failed to load ‘’<filename.md>‘’. Cannot read properties of undefined (reading ‘setCssClass’).
Almost all of my notes have frontmatter such as
---
aliases:
updated:
created:
tags:
status:
---
Here’s the error from Console
TypeError: Cannot read properties of undefined (reading 'setCssClass')
at t.loadFrontmatter (app.js:1:2087082)
at t.setViewData (app.js:1:2087881)
at t.setData (app.js:1:1823571)
at t.<anonymous> (app.js:1:1823474)
at app.js:1:237030
at Object.next (app.js:1:237135)
at a (app.js:1:235853)
Things I have tried
I have turned on Restricted mode and I am using only the default style. Also tried reinstalling previous releases and restarted my laptop. Still the same error message. Please help! Thanks!
I also saw this and it’s really unfortunate, because I’m not a fan of the new editor. I want to have the source editor just being a plain editor. Not showing bigger fonts if it’s #### and so on. That should only be in the Live Preview view. Give me a plain monspaced editor.
Give this snippet a spin. You can use the entire thing or pick out pieces that you’d like. It’s still missing a few edge cases, but it’s fairly barebones.
Thx! How do I get the font smaller and another color though? I would like to have it the same as the metadata like creation date and modification date.
For the body font and size, add color and font-size to this section
/*- monospace font for source mode -*/
.markdown-source-view:not(.is-live-preview) .cm-scroller {
--font-text: 'JetBrains Mono', var(--font-monospace);
color: blue;
font-size: 14px; }
You may need to add color in other places to take care of code blocks, callouts, etc. If you have any other questions, feel free to @ me in the MarkGone thread so we don’t clutter this one up.