Allow Opening and Editing of any plain text file in Obsidian

Use case or problem

Obsidian states it allows you to work in a plain text filesystem:

This is not true, as obsidian ONLY supports markdown files, and on top of that, Obsidian has the unique requirement of the markdown file having an .md extension, which is not required by the standard, most programs, or filesystems.

Not only does obsidian require specially decorated files just for it (not plain text as it claims), but if it is a plain text, or markdown file, and the extension is incorrect, obsidian refuses to open them.

I can see in the obsidian API itself where it could allow for more file types. I’m just confused why a plain text editor can’t edit plain text.

Proposed solution

Allow any file that is encoded in plain text to be opened in Obsidian for editing just like a .md file; or provide an option to list the allowed extensions to display as opposed to limiting it to just .MD

Current workaround (optional)

The current workaround involves not using obsidian at all to open any file in your vault that is not .md (even though obsidian’s features include files that you need to edit that are not .md files [.css/.js]).

This workaround does not always work, as obsidian sync does not seem to track edits in other apps as well. With my own tests I have found that editing a .js file in my vault in another app, then opening obsidian has the potential to revert or delete the .js file without ever recording it’s history in the changelog. This is very bad for an app focused on recording information.

Another workaround would be to make a custom plugin, but a custom plugin and exiting safe mode just to edit to text files with a text editor seems like a step a lot of base level users wouldn’t want just to use the already built in features of obsidian.


Good point about the misleading marketing wording.

Check out GitHub - dbarenholz/obsidian-plaintext: Adds support for plaintext editing into obsidian. My own purpose is to edit .bib files directly, but surely others can find reasons to use it.


Thanks for the reply @obsequious.
I have in fact seen that plugin, but as I addressed in my post above, asking someone to exit safe mode to edit a text file in a text editor seems like a shot in the foot to obsidian itself.

Also, I’m in the process of learning how to edit plugins myself so I can update the plugin you’ve posted as we speak. Saddly it only works for pure text files unless you edit the plugin too yourself using… an exteral text editor lol.

I don’t think it’s a good solution to ask someone to download a plugin and edit the js in it manually then re-load obsidian to edit files that the editor could otherwise manage with a one line code change and has been claiming to manage in marketing for a long time right?


While I completely agree that this should be a built-in feature, I’ve found the following (partial) workaround.

The plugin Txt as md allows you to open and edit .txt files directly in Obsidian. I’ve hacked it a bit, and created Obsidian_Plugin-CSV_as_MD for doing the same with .csv files.

I haven’t played with Obsidian plugins before at all, but hope to expand the latter to allow people to specify a list of file extensions that Obsidian will register to open for editing as native, though this would necessarily be limited to plaintext files, and I have no timeline for this at all.


It’s worth pointing out that, while this allows other plaintext files to be read and edited, it does not make them functionally equivalent to .md in Obsidian. Which is limiting.


This is my first attempt at a plugin:

I still hope this is only needed temporarily. I would prefer this is added as a core functionality.

Thanks, @Meeps!

Looking forward to being able to use this!

Just wanted to add another vote for this. In particular, it’d be nice to be able to open JS files in a “scripts” folder that Templater users right in Obsidian, but the general case for any file extension that contains typically text files would be ideal.


None of the plugins listed here actually work. They are limited. It would have been really nice if Obsidian supports other plain text variants.

1 Like

I’m managing a lot xml so I’m in the same case. I found this plugin : plaintext which allow me to do this. With it you can edit all xml like md files.

@Dellu @crabtronic my plugin is now published and should work… sadly it hasn’t been added to the base product but I hope this works for your needs!

1 Like

Sorry forgot to let you know it was all ready too!
cc @drventure @cwhiii

1 Like

What does your plugin do that txt as md doesn’t?

You can use it to view and edit any plaintext file extension you add to its list, but Obsidian still doesn’t treat those files as equivalent to .md. Does your plugin do more that that?

The main benefit here is that “Custom File Extension Plugin” allows you to select many/all types of files to view & edit directly in Obsidian, rather than just .txt or .csv.

1 Like

Txt as MD allows that too.

As far as I and it seems other can tell: It does not.

Can you explain and maybe provide a screenshot or two?

It’s been mentioned elsewhere too

In the post you linked it is said that one can add other extensions by editing the main.js file. This is not a viable option for many users.

The Custom File Extension plugin allows you to do that using settings and a JSON object.

Finally, the plaintext plugin allows for extra extensions to be added in a comma separated list in the settings.

The final two are understandable for most people and somewhat easy, whilst the first is not.

The middle one is also maintained recently, whilst the other two not so much. Not sure why, but I’m still using the plaintext variant.

Ease is one thing, extra features were my question. Asked because new plugins appear often without explanation of how they differ from existing plugins. The answer was that txt as md doesn’t allow any plaintext extension which is incorrect.

Maintenance isn’t necessary when plugins still work as intended. Another way of judging plugins is by the reputation of the developer.

Sorry, you can open any file in Obsidian.

Preferences > files & links > detect all file types