I’m very new to Nextcloud, having started just a few days ago. I encountered an issue with viewing and using Markdown (.md) files. I want a preview mode rather than opening them directly in edit mode. Here are my findings after spending an entire day searching for answers and solutions.
It appears that older versions of the Text app had this preview feature, and earlier versions of Nextcloud offered settings for it as well. Some apps can provide this functionality, but they’re not available for newer servers.
So, here’s my temporary fix. I hope it helps others facing the same challenge—or that someone can offer a more straightforward solution, as it was quite an ordeal just to enable preview mode for Markdown files.
Fixing Markdown File Navigation in Nextcloud
Environment
- Nextcloud Hub 9 (NC27)
- Text app 4.1.0 (default installed)
- Notes app 4.11.0 (solution)
The Problem
By default, Nextcloud’s Text app forces markdown files to open in edit mode, breaking normal web browsing functionality.
I tried -
* looked for default file handling behaviors and did not find it
* looked for text app settings but could not find any
* looked for replacement markdown viewer apps - none compatible showing in store
* manually changing config files but could not get the desired result
The Solution
- not optimal, hoping temporary until apps get updates -
Use the Notes app instead of the Text app for markdown file viewing:
- Install Notes app 4.11.0
- Configure two settings:
Notes path: [selected folder my md files are in]
Display mode: Preview
The Result
Files now open in preview mode with normal browser functionality:
- Files open in clean preview mode
- All browser functions work normally:
- Back/forward navigation
- Multiple tabs
- Browser history
- Search
- Bookmarks
- Can still edit when needed
- Functions like normal web pages
Limitation
- Must keep markdown files in the designated Notes path folder
- Single top-level folder for all markdown files
Keyboard Shortcuts
- CTRL + /: Switch between editor and viewer
- Other standard markdown shortcuts available in edit mode