give this css snippet a try. save it as a .css file to [vault]/.obsidian/snippets
and enable it in Settings > Appearance > CSS Snippets
the css class .is-live-preview
sort of gives u the if-else toggle – for this snippet to apply, you will have to go to Settings > Editor > Default Editing Mode and select Source Mode. In Live Preview it will still formatted per default.
this should remove all the usual formatting.
/* remove formatting and set font to single size monospace */
.markdown-source-view:not(.is-live-preview) * {
background: unset !important;
color: unset !important;
font-size: 1rem !important;
font-weight: unset !important;
font-family: monospace !important;
}
/* in case themes uses ::after div formatting for borders and so on */
.markdown-source-view:not(.is-live-preview) *::after {
border: unset !important;
}