ahseyg10 downloadsOpen non-markdown files (.py, .html, .txt, .js, .css, etc.) as editable text documents directly in Obsidian.
Transform Obsidian into a powerful code editor for your non-markdown files. This plugin allows you to open, view, and edit files like .py, .js, .html, .css, and .json natively within your vault, complete with syntax highlighting and line numbers.
Open source · MIT License · Contributions welcome



Obsidian is excellent for Markdown, but occasionally you need to edit scripts, configuration files, or web documents without leaving your vault. Instead of relying on external editors, Masking as MD integrates a fully-fledged CodeMirror 6 editor directly into Obsidian.
Files are opened securely as plain text. No conversions to Markdown occur, and your files are never modified unless you manually edit and save them.
The plugin provides built-in syntax highlighting for the following languages out of the box:
.js, .jsx, .ts, .tsx).py).html, .htm).css, .scss, .less).json).md, .markdown - if forced to open with this plugin)Navigate to Settings → Masking as MD to configure the plugin:
| Setting | Description |
|---|---|
| File Extensions | Comma-separated list of extensions to handle (e.g. py, js, html, css, txt). Requires restart. |
| Syntax Highlighting | Enable or disable CodeMirror syntax highlighting. |
| Line Numbers | Display line numbers on the left side of the editor. |
| Word Wrap | Wrap long lines of code to avoid horizontal scrolling. |
| Font Size | Set your preferred editor font size using the slider. |
Or open directly: community.obsidian.md/plugins/masking-as-md
main.js, manifest.json, styles.css from the latest releaseVaultFolder/.obsidian/plugins/masking-as-md/If you find this plugin useful, consider giving it a star.
If you wish to build the plugin from source:
npm install to install dependencies.npm run build to compile the plugin.MIT — See LICENSE for details.
Developed by ahseyg