Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Expanding editable extensions #2

Open
thw26 opened this issue Jul 7, 2021 · 1 comment
Open

Expanding editable extensions #2

thw26 opened this issue Jul 7, 2021 · 1 comment

Comments

@thw26
Copy link

thw26 commented Jul 7, 2021

I was considering using Obsidian to edit some .fodt files to make use of Git versioning, but Obsidian doesn't recognize .fodt as flat text files, nor does it recognize .xml files.

Would it be as trivial as modifying https://github.com/deathau/txt-as-md-obsidian/blob/main/src/main.ts to add more?

@deathau
Copy link
Owner

deathau commented Jul 7, 2021

It would be that easy for sure.
The way this plugin specifically is written, though, it will interpret them as markdown files, which may not be exactly what you want.

My suggestion would be to instead fork this one: https://github.com/deathau/ini-obsidian and modify it for whichever file types you want to support. For example, for XML you can basically replace ini with xml (and add fodt, etc to registerExtensions) and instead of using the "properties" mode in codemirror, grab the xml mode from CodeMirror (or my editor syntax highlight plugin here: https://github.com/deathau/cm-editor-syntax-highlight-obsidian/tree/main/mode/xml)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants