Surely there is a way to open Markdown files as view-only?

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedl

So here I am on Nextcloud 25.0.13. The text and files_markdown applications are installed.

Opening an .md file on the browser results in some sort of in-browser text editor opening and, more often than not, causing conflicts with the actual file saved on disk on a client.

I tried this from the text [README](GitHub - nextcloud/text: 📑 Collaborative document editing using Markdown) but it does not make the slightest difference (I have refreshed the browser page):

occ config:app:set text open_read_only_enabled --value=1

For good measure, I have also tried this, even though I’ve no idea what “workspaces” are supposed to be:

occ config:app:set text workspace_available --value=0

And I’ve even disabled files_markdown. Nothing.

The only way to get the editor to stop showing up is this:

occ config:app:set text rich_editing_enabled --value=0

But then the file preview stops rendering as Markdown.

So, how do I actually configure things so that:

  • When I open a text file (.txt) it shows the text as fixed-font plain text
  • When I open a Markdown file (.md) it renders the Markdown
  • At no point does it attempt to offer the user an in-browser editor option

25.0.13 hasn’t been supported for quite awhile now. The options/features you’re trying to use, are in more current versions, but weren’t in v25.

1 Like

Thank you, that’s what I gathered. Unfortunately, upgrading won’t be an easy task but I’ll see what can be done.

I have managed to upgrade to 30.0.17.

This is the Text app configuration:

{
    "apps": {
        "text": {
            "workspace_available": "0",
            "types": "dav",
            "open_read_only_enabled": "1",
            "installed_version": "4.1.0",
            "enabled": "no"
        }
    }
}

But when I click on a Markdown file, it still opens an editor and more often than not it “saves” the file, causing synchronisation conflicts at best and accidental modifications and data loss at worst.

I do not want collaborative editing, if that’s what the Text app provides. I only want to view Markdown files as rendered views on the browser; nothing else. That used to be the standard behaviour, as I recall.

Can that be achieved at all?

v30 is end of life. The feature is in >=v31.

1 Like

Thanks for your help, got there in the end. Can’t say I’m impressed with a design choice that assigns the highest risk, least likely course of action (collaborative editing) to the simplest interaction (click).

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.