Masking as MD

by ahseyg
5
4
3
2
1
New Plugin

Description

Open non-markdown files (.py, .html, .txt, .js, .css, etc.) as editable text documents directly in Obsidian. - This plugin has not been manually reviewed by Obsidian staff.

Reviews

No reviews yet.

Stats

stars
downloads
0
forks
0
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Masking as MD for 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


Features

  • Native Code Editor Experience — turn Obsidian into a lightweight IDE for your scripts and config files
  • Syntax Highlighting — built-in CodeMirror support for popular programming and markup languages
  • Customizable Interface — toggle syntax highlighting, line numbers, and word wrap
  • Typography Control — adjust the editor font size to your liking
  • Seamless Integration — supported files open just like standard Markdown files, or right-click any file to "Open as Text"

Screenshots

Code Editor View

Code Editor View 2

Settings

Settings View


Why Masking as MD?

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.


Supported Languages

The plugin provides built-in syntax highlighting for the following languages out of the box:

  • JavaScript / TypeScript (.js, .jsx, .ts, .tsx)
  • Python (.py)
  • HTML (.html, .htm)
  • CSS / SCSS / LESS (.css, .scss, .less)
  • JSON (.json)
  • Markdown (.md, .markdown - if forced to open with this plugin)

Configuration Reference

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.

Installation

  1. Settings → Community Plugins
  2. Turn off Restricted Mode
  3. Browse → search Masking as MD
  4. Install → Enable

Or open directly: community.obsidian.md/plugins/masking-as-md

Manual

  1. Download main.js, manifest.json, styles.css from the latest release
  2. Create VaultFolder/.obsidian/plugins/masking-as-md/
  3. Copy the files into the folder
  4. Enable in Settings → Community Plugins

Contributing

If you find this plugin useful, consider giving it a star.


Development

If you wish to build the plugin from source:

  1. Clone this repository.
  2. Run npm install to install dependencies.
  3. Run npm run build to compile the plugin.
  4. Copy the output files to your Obsidian vault's plugin folder.

License

MIT — See LICENSE for details.