chrishoward-projects653 downloadsProvides a customisable raw look in source mode using a monospace font to clearly differentiate from Live Preview.
Differentiate your Obsidian source mode from Live Preview edit mode with a raw text like aesthetic using customizable monospace fonts and styling options.
Source Mode Styling enhances Obsidian's source mode editor by applying monospace fonts and customizable styling that's familiar to developers and text editor users. While Obsidian's default source mode shows markdown syntax but retains most visual formatting, this plugin gives you an authentic "raw" editing experience providing greater differentiation with the Live Preview editor mode.
Key Benefits:
.obsidian/plugins/sourcemode-styling/ directory| Setting | Description | Options |
|---|---|---|
| Monospace font | Choose your preferred coding font | Auto-detected system fonts + theme default |
| Font weight | Control text thickness | Normal, Light, Semi-bold, Custom (100-900) |
| Font size | Adjust text size for readability | Custom or theme default |
| Font colour | Set font custom colour | Custom colour picker or theme default. |
| Line height | Adjust vertical spacing | Custom or theme default |
| Heading colour | Set custom headings colour. | Custom colour picker or theme default |
| Background colour | Set editor background | Custom colour picker or theme default |
The plugin automatically detects monospace fonts installed on your system, including popular options like:
Obsidian Live Preview mode

Default Obsidian Source Mode:

With Source Mode Styling:

The plugin works seamlessly with Obsidian themes:
For advanced users, the plugin adds a class .source-mode-raw and generates CSS that can be further customized:
/* All text */
.source-mode-raw .markdown-source-view.mod-cm6 .cm-scroller {
/* Your styles */
}
/* Headings */
.source-mode-raw .markdown-source-view.mod-cm6 .cm-header {
/* Your styles */
}
Contributions are welcome! Please see our development documentation for setup instructions.
npm install to install dependenciesnpm run dev for development with hot reloadnpm run build to build for productionSee CHANGELOG.md for version history and release notes.
MIT License © Chris Howard 2025