Disable markdown

Things I have tried

Lots of searching and plugin research.

What I’m trying to do

I have 1000s of plain text notes (files) I want to import, which I have done. But they were created with a fixed-width font and have characters that markdown is trying to render as format codes.

I could edit every file and prefix / postfix with the three back-ticks, but really, I would also want that for every single note going forward as well. Ultimately, I don’t really care about formatting and really just want a better organizational system than vim and grep.

Before I dive too deeply in the API, is it possible to hook loading of notes and force them to be code blocks? Are there other options?

From the command pallet (click button on left toolbar or use shortcut Ctrl/Cmd-P), choose “Toggle Live Preview/Source Mode”

Thanks for telling me about that. It does somewhat help. But lines that start with hashtag # (aka a comment line in a source snippet) are still rendered has large text headings.

Though, it gives me an idea; I wonder if I can make a snippet or theme that is basically gives all md codes a no-op rendering.

# this is a test

if (a==b) {


as an example

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;

Right. If you want just a text editor, source view plus some CSS will get you there. It’s all customizable.

1 Like

wow! this is very promising. i appreciate you putting that together for me. i only got as far as setting the font last night and other minor tweaks, but initial test shows this is basically what i’m looking for. thanks!

1 Like

Glad it works for u. Lemme know if there r formatting i missed, i should be able to help u out on that.

You could also switch all the problematic files to .txt, and then install and use the plaintext community plugin to edit them when necessary. (I don’t think it applies any markdownish styling to these files, it just lets you view/edit them.)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.